Skip to content

Commit

Permalink
fix: decompress response data
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffersonfelixdev committed Nov 23, 2022
1 parent f92e167 commit e5c959a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/adapters/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,11 @@ export default isHttpAdapterSupported && function httpAdapter(config) {
if (config.decompress !== false) {
// if no content, but headers still say that it is encoded,
// remove the header not confuse downstream operations
if ((!responseLength || res.statusCode === 204) && res.headers['content-encoding']) {
if (
(!responseLength || res.statusCode === 204) &&
res.headers['content-encoding'] &&
!res.headers['transport-encoding']
) {
delete res.headers['content-encoding'];
}

Expand Down

0 comments on commit e5c959a

Please sign in to comment.