Skip to content

RequestBodyBufferMiddleware: 411 No Content Length for GET requests? #232

Closed
@andig

Description

@andig

I'm doing some testing with Guzzle as client and I'm running into unexpected behaviour- 411 instead of qualified response.

In

return new Response(411, array('Content-Type' => 'text/plain'), 'No Content-Length header given');
an HTTP 411 is returned when Content-length is not set. According to https://stackoverflow.com/questions/8540931/what-is-the-correct-content-length-to-set-for-a-get-request this requirement should not be necessary.

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.

IMHO that would mean that the 411 should not be returned for GET requests and instead 0 assumed.

cc @WyriHaximus

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions