Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Lint checks for Content-Length or Body on Status with no Body#592

Open
haarg wants to merge 1 commit into
plack:masterplack/Plack:masterfrom
haarg:lint-no-bodyhaarg/Plack:lint-no-bodyCopy head branch name to clipboard
Open

Lint checks for Content-Length or Body on Status with no Body#592
haarg wants to merge 1 commit into
plack:masterplack/Plack:masterfrom
haarg:lint-no-bodyhaarg/Plack:lint-no-bodyCopy head branch name to clipboard

Conversation

@haarg

@haarg haarg commented Jul 10, 2017

Copy link
Copy Markdown
Member

No description provided.

@miyagawa

miyagawa commented Jul 10, 2017

Copy link
Copy Markdown
Member

Looking at the spec, it seems it is allowed to send Content-Length to 304, in a way that it sends the exact same value for the original 200 response. I would say this is extremely rare with a PSGI application, but seems invasive for a framework to restrict that.

https://tools.ietf.org/html/rfc7230#section-3.3.2

   A server MAY send a Content-Length header field in a 304 (Not
   Modified) response to a conditional GET request (Section 4.1 of
   [RFC7232]); a server MUST NOT send Content-Length in such a response
   unless its field-value equals the decimal number of octets that would
   have been sent in the payload body of a 200 (OK) response to the same
   request.
   A server MUST NOT send a Content-Length header field in any response
   with a status code of 1xx (Informational) or 204 (No Content).  A
   server MUST NOT send a Content-Length header field in any 2xx
   (Successful) response to a CONNECT request (Section 4.3.6 of
   [RFC7231]).

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.