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

OPTIONS and empty response #235

Closed
reschke opened this issue Aug 19, 2019 · 2 comments
Closed

OPTIONS and empty response #235

reschke opened this issue Aug 19, 2019 · 2 comments
Assignees

Comments

@reschke
Copy link
Contributor

reschke commented Aug 19, 2019

https://greenbytes.de/tech/webdav/rfc7231.html#rfc.section.4.3.7.p.4:

A server MUST generate a Content-Length field with a value of "0" if no payload body is to be sent in the response.

That is incorrect, as the status code could be 204, or the response might come with chunked encoding (even when empty).

This is https://www.rfc-editor.org/errata/eid5806.

@awwright
Copy link

What purpose is this requirement serving? It seems to have the effect of prohibiting Transfer-Encoding: chunked with a zero length payload.

Shouldn't RFC 7230, "3.3.3. Message Body Length" be sufficient for determining payload sizes?

@reschke
Copy link
Contributor Author

reschke commented Aug 22, 2019

Agreed. The text makes it sound as if OPTIONS is somehow special. Giving advice might be good, but the use of normative keywords makes this confusing.

The simplest fix might indeed be to remove the sentence.

reschke added a commit that referenced this issue Sep 1, 2019
reschke added a commit that referenced this issue Sep 1, 2019
reschke added a commit that referenced this issue Sep 2, 2019
Removed superfluous requirement about setting Content-Length from the description of the OPTIONS method (#235)
@reschke reschke closed this as completed Sep 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants