8000 Fix chunked encoding with broken ending by algesten · Pull Request #454 · algesten/ureq · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix chunked encoding with broken ending #454

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

Closed
wants to merge 2 commits into from
Closed

Conversation

algesten
Copy link
Owner

Some websites do not end chunked encoding correctly. The spec says the end should be:

0\r\n
\r\n

However some sites stop short after 0\r\n. Curl handles this case fine.

Close #325

@algesten algesten marked this pull request as draft December 19, 2021 14:39
@algesten
Copy link
Owner Author

I don't actually have a plan for how to fix this just yet.

I don't know whether the people behind the chunked_transfer crate would be open to a fix where the final \r\n is optional. Otherwise we need to handle it un ureq.

@Shnatsel
Copy link

This needs to be handled with care, since it might allow HTTP desync attacks and request smuggling.

@jhwgh1968 might know more about this particular case.

@algesten
Copy link
Owner Author

@Shnatsel Good point! I provided a naive fix in upstream repo – maybe needs more thought. 🤔 frewsxcv/rust-chunked-transfer#11

@algesten algesten force-pushed the fix/chunked-broken-end branch from 6667724 to be81985 Compare December 9, 2022 16:21
@algesten algesten marked this pull request as ready for review December 9, 2022 16:22
@jsha
Copy link
Collaborator
jsha commented Dec 10, 2022

I comment on #325 (comment) - I think we should first implement trailers and see if we still have this problem. At least one of the affected sites that I spot-checked was actually sending trailers.

@algesten algesten closed this Aug 13, 2024
@algesten algesten deleted the fix/chunked-broken-end branch August 13, 2024 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
5BB5
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Error while decoding chunks" on some websites
3 participants
0