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

don't submit content-length header on GET requests #184

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gmdayley
Copy link

According to the HTTP spec the presence of the 'Content-Length' header signals that there is a message body (even if the length is 0). Also, since according to the spec, GET requests do not allow message bodies and therefore should not include the 'Content-Length' header.

From RFC 2616, Section 4.3:

"The presence of a message-body in a request is signaled by the
inclusion of a Content-Length or Transfer-Encoding header field in
the request's message-headers. A message-body MUST NOT be included in
a request if the specification of the request method (section 5.1.1)
does not allow sending an entity-body in requests."

@damienleroux
Copy link

Hi,

It is possible to include this changes to the base branch. I met the same problem. My server is not designed to handle the "content-length" header from GET request...

Thank you gmdayley for your code

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