Skip to content

Commit

Permalink
Correctly set response base64
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewBarba committed Mar 16, 2021
1 parent 209deee commit f3b6e8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/response.js
Original file line number Diff line number Diff line change
Expand Up @@ -473,8 +473,8 @@ class RESPONSE {
if (this._compression && this._response.body) {
const { data, contentEncoding } = compression.compress(this._response.body, this._request.headers)
if (contentEncoding) {
this._isBase64 = true
this._response.body = data.toString('base64')
this._response.isBase64Encoded = true
this._response.headers['content-encoding'] = [contentEncoding]
}
}
Expand Down

0 comments on commit f3b6e8f

Please sign in to comment.