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

Poll inner connection until EOF after gzip decoder is complete #2484

Merged

Conversation

Andrey36652
Copy link
Contributor

Fix for #2381

@Andrey36652
Copy link
Contributor Author

Should I expand the fix on all other decompression methods?

@seanmonstar
Copy link
Owner

If they all have the same characteristic, namely that they know they ended before reading EOF, then they probably all suffer from the same thing.

@Andrey36652
Copy link
Contributor Author

Should I add tests for all other decompression methods?

@seanmonstar
Copy link
Owner

You can. If so, I'd do with a for loop, or some pattern to reduce the duplicate parts.

@Andrey36652
Copy link
Contributor Author

Can reqwest deal with such cases (multiple compression algorithms)?

// Multiple, in the order in which they were applied
Content-Encoding: deflate, gzip

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding

@seanmonstar
Copy link
Owner

I don't think it can, but not a single person has filed saying they needed it. So I suspect that is more of a theoretical part of the spec, and not something that servers ever actually do.

So I wouldn't bother supporting it for now, it'd make things complicated and we don't seem to need it.

@Andrey36652
Copy link
Contributor Author

I don't know why it fails style check, cargo fmt -- --check locallly shows no errors.

@seanmonstar
Copy link
Owner

Some code doesn't get formatted automatically because of conditional #[cfg] flags leaving some files out. You can run cargo fmt -- $(find . -name '*.rs' -print) to get all of them.

Copy link
Owner

@seanmonstar seanmonstar left a comment

Choose a reason for hiding this comment

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

Excellent, excellent, excellent work. Thanks so much for cleaning this up! <3

@seanmonstar seanmonstar merged commit d36c0f5 into seanmonstar:master Dec 3, 2024
36 checks passed
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.

2 participants