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

Handle empty compressed responses with content-length > 0 #257

Merged
merged 1 commit into from
May 14, 2022

Conversation

ducaale
Copy link
Owner

@ducaale ducaale commented May 14, 2022

Resolves #253

Comment on lines 97 to 98
Err(e) if decoder.get_ref().has_errored => Err(e),
Err(_) if !decoder.get_ref().has_read_data => Ok(0),
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The check has to be done in this order to avoid ignoring InnerReader errors when no data has been read

Copy link
Collaborator

@blyxxyz blyxxyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great!

@ducaale ducaale merged commit 898dc2e into master May 14, 2022
@ducaale ducaale deleted the emtpy-gzip-head-response branch May 14, 2022 19:40
@ducaale ducaale changed the title Handle empty gzip responses with content-length > 0 Handle empty compressed responses with content-length > 0 May 14, 2022
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.

HEAD fails on compressed response
2 participants