Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: decompress response data #5300

Open
wants to merge 3 commits into
base: v1.x
Choose a base branch
from

Conversation

jeffersonfelixdev
Copy link

@jeffersonfelixdev jeffersonfelixdev commented Nov 23, 2022

This PR fixes #5296 and fixes #5298.

@ddugovic created a test to reproduce this problem. In fact, content-lenght is undefined in most of cases when using gzip compression and transfer-encoding is set to chunked. In this case, I tried to verify the presence of transfer-encoding (but not sure if it's correct).

BTW, this PR does not break the test created on #5250.

I think it's ready to merge.

@ddugovic
Copy link

Please review my test at #5299 (which looks reasonable but npm test isn't running for me at the moment).

@jeffersonfelixdev
Copy link
Author

jeffersonfelixdev commented Nov 23, 2022

Your test is passing :(

BUT, when I add: res.setHeader('content-length', 0) the test fails.

@jeffersonfelixdev
Copy link
Author

Using test provided by @ddugovic and added the header 'Transfer-Encoding' I can reproduce the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error response data nodejs 1.2.0 transformResponse
2 participants