We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
sindresorhus
szmarczak
Learn more about funding links in repositories.
Report abuse
1 parent 4d92eb6 commit 99dbd97Copy full SHA for 99dbd97
source/as-stream.js
@@ -72,7 +72,8 @@ module.exports = options => {
72
for (const [key, value] of Object.entries(response.headers)) {
73
// Got gives *uncompressed* data. Overriding `content-encoding` header would result in an error.
74
// It's not possible to decompress uncompressed data, is it?
75
- if (key.toLowerCase() !== 'content-encoding') {
+ const allowed = options.decompress ? key !== 'content-encoding' : true;
76
+ if (allowed) {
77
destination.setHeader(key, value);
78
}
79
0 commit comments