Skip to content

Commit

Permalink
propagation of response encoding if present and not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
beatchristen committed Mar 5, 2021
1 parent 3b296ca commit 20b078e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/entryFromResponse.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ module.exports = function(entry, response, page, options) {
status: response.status,
statusText: response.statusText,
content: {
encodig: response.encoding,
mimeType: response.mimeType,
size: text != null ? text.length : 0,
text: text
Expand All @@ -90,6 +89,9 @@ module.exports = function(entry, response, page, options) {
headers,
_transferSize: response.encodedDataLength
};
if (response.encoding) {
entry.response.content.encoding = response.encoding;
}

const locationHeaderValue = getHeaderValue(responseHeaders, 'Location');
if (locationHeaderValue) {
Expand Down

0 comments on commit 20b078e

Please sign in to comment.