Skip to content

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