-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 hanging caused by Transfer-Encoding: chunked #5289
Conversation
* Fixes caddyserver#5236 * enable request body buffering in reverse proxy when the request header has Transfer-Encoding: chunked
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but I'd like @mholt to review as well just in case he can think of some edgecase/oversight to this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks nice and clean. Thank you for the patch! I am so glad you contributed this 😃
Edit: As for edge cases, is there one? No idea. Probably. But I think the current logic is still an improvement. We can try it and see how it fares in the wild. If people experience issues with it we'll let you know! 👍
Narrator: There were definitely edge cases. See #5366.
* reverseproxy: Don't buffer chunked requests (fix #5366) Mostly reverts 845bc4d (#5289) Adds warning for unsafe config. Deprecates unsafe properties in favor of simpler, safer designed ones. * Update modules/caddyhttp/reverseproxy/caddyfile.go Co-authored-by: Y.Horie <u5.horie@gmail.com> * Update modules/caddyhttp/reverseproxy/reverseproxy.go Co-authored-by: Y.Horie <u5.horie@gmail.com> * Update modules/caddyhttp/reverseproxy/reverseproxy.go Co-authored-by: Y.Horie <u5.horie@gmail.com> * Remove unused code --------- Co-authored-by: Y.Horie <u5.horie@gmail.com>
when the request header has Transfer-Encoding: chunked