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

Add Content-* headers for empty POST requests #368

Merged

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Sep 26, 2019

This PR consolidates the work done by @dd32 in PR #249 and @soulseekah in PR #318 which both addressed the same issue.

Fixes #248
Closes #249
Closes #318

@dd32
Copy link
Member

dd32 commented Sep 26, 2019

As the author of #249 this looks good to me, not having actually run the code in several years.

@gstrauss
Copy link

The HTTP method POST by definition contains an entity body. As such, the Content-Length request header must be set, or the entity body must be sent via HTTP/1.1 Transfer-Encoding: chunked (or HTTP/2).

There are numerous prior tickets (#249, #318) and plenty of blog posts about this issue. Additionally, this bug reintroduced a bug fixed 12 years ago in Wordpress. https://core.trac.wordpress.org/ticket/8605

The patch in this PR is simple and looks reasonable, and this PR is over a year old. #249 is from 2016 (!)

What is holding up actioning this PR, committing and releasing a fix?

@jrfnl jrfnl force-pushed the feature/249-318-add-content-headers-empty-post-requests branch from 1c2e6d4 to 890d048 Compare October 21, 2020 12:29
@schlessera schlessera merged commit ac48e62 into master Oct 21, 2020
@schlessera schlessera deleted the feature/249-318-add-content-headers-empty-post-requests branch October 21, 2020 17:43
@gstrauss
Copy link

Thank you for picking this up, @schlessera, and thank you, @jrfnl, for jumping back in to quickly incorporate feedback to make the patch ready to merge.

@jrfnl
Copy link
Member Author

jrfnl commented Oct 22, 2020

@gstrauss Case of striking the iron when it's hot and such ... 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Content-Length header not specified for empty POST requests with fsockopen transport
5 participants