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

Fixing Z_BUF_ERROR when no content #4701

Merged
merged 5 commits into from May 12, 2022

Conversation

lejahmie
Copy link
Contributor

@lejahmie lejahmie commented May 10, 2022

When response headers content-encoding is set but no content exist zlib fails with Z_BUF_ERROR.

Solution is to check if data exist, if it does not we should never try to decompress.
If no data exists, but content-encoding still says it is encoded we simply remove the header not confuse downstream operations.

Fixes:
#3989
#3648
#3055

@lejahmie
Copy link
Contributor Author

lejahmie commented May 11, 2022

Fixed issues with eslint tests

@jasonsaayman
Copy link
Member

jasonsaayman commented May 12, 2022

Thanks this looks good 😊

@jasonsaayman jasonsaayman merged commit c6ec5fc into axios:master May 12, 2022
3 checks passed
@lejahmie
Copy link
Contributor Author

lejahmie commented May 12, 2022

@jasonsaayman you can probably close these when this is in;
#3989
#3648
#3055

@jasonsaayman
Copy link
Member

jasonsaayman commented May 12, 2022

Thanks will do

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.

None yet

2 participants