Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix hanging caused by Transfer-Encoding: chunked #5289

Merged
merged 1 commit into from
Jan 9, 2023

Conversation

u5surf
Copy link
Contributor

@u5surf u5surf commented Jan 7, 2023

* Fixes caddyserver#5236
* enable request body buffering in reverse proxy
  when the request header has Transfer-Encoding: chunked
@francislavoie francislavoie added the bug 🐞 Something isn't working label Jan 7, 2023
@francislavoie francislavoie added this to the v2.6.3 milestone Jan 7, 2023
@francislavoie francislavoie requested a review from mholt January 7, 2023 18:15
Copy link
Member

@francislavoie francislavoie left a 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.

Copy link
Member

@mholt mholt left a 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.

@mholt mholt merged commit 845bc4d into caddyserver:master Jan 9, 2023
mholt added a commit that referenced this pull request Feb 10, 2023
Mostly reverts 845bc4d (#5289)

Adds warning for unsafe config.

Deprecates unsafe properties in favor of simpler, safer designed ones.
mholt added a commit that referenced this pull request Feb 12, 2023
* 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>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug 🐞 Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Transfer-Encoding: chunked causing php_fastcgi to hang
3 participants