Subject: [Technical Errata Reported] RFC7231 (5806)

From: RFC Errata System <[email-masked]>
Date: Sun, 11 Aug 2019 19:27:30 -0700 (PDT)

The following errata report has been submitted for RFC7231,
"Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content".

--------------------------------------
You may review the report below and at:
https://www.rfc-editor.org/errata/eid5806

--------------------------------------
Type: Technical
Reported by: Anders Kaseorg <[email-masked]>

Section: 4.3.7

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

Corrected Text
--------------
If no payload body is to be sent in the response, a server MUST
generate a status code of 204 (No Content) or a Content-Length field
with a value of "0" (but not both).

Notes
-----
The original text contradicts RFC 7230 §3.3.2: “A server MUST NOT send a Content-Length header field in any response with a status code of 1xx (Informational) or 204 (No Content)”, unless the intention was to disallow all 204 responses to OPTIONS requests, which I assume it was not.

Instructions:
-------------
This erratum is currently posted as "Reported". If necessary, please
use "Reply All" to discuss whether it should be verified or
rejected. When a decision is reached, the verifying party  
can log in to change the status and edit the report, if necessary. 

--------------------------------------
RFC7231 (draft-ietf-httpbis-p2-semantics-26)
--------------------------------------
Title               : Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content
Publication Date    : June 2014
Author(s)           : R. Fielding, Ed., J. Reschke, Ed.
Category            : PROPOSED STANDARD
Source              : Hypertext Transfer Protocol Bis APP
Area                : Applications
Stream              : IETF
Verifying Party     : IESG

---

From: Willy Tarreau <[email-masked]>
Date: Mon, 12 Aug 2019 07:49:53 +0200

On Sun, Aug 11, 2019 at 07:27:30PM -0700, RFC Errata System wrote:
> The original text contradicts RFC 7230 §3.3.2: "A server MUST NOT send a
> Content-Length header field in any response with a status code of 1xx
> (Informational) or 204 (No Content)", unless the intention was to disallow
> all 204 responses to OPTIONS requests, which I assume it was not.

Indeed, it seems valid to me. With this said, I don't know how common
it is to respond with 204 to an OPTIONS request given that 204 is
reportedly cacheable by default (6.3.5) while OPTIONS is said not to
be. Thus more confusion may arise on this point as well.

Willy

---

From: Amos Jeffries <[email-masked]>
Date: Mon, 12 Aug 2019 20:05:52 +1200

On 12/08/19 5:49 pm, Willy Tarreau wrote:
> Indeed, it seems valid to me.

Ditto.

> With this said, I don't know how common

That should not be an issue since the 204 caching is explicitly "unless
otherwise indicated by the method definition".

Amos

---

From: Willy Tarreau <[email-masked]>
Date: Mon, 12 Aug 2019 10:11:09 +0200

> otherwise indicated by the method definition".

OK that makes sense indeed.

Willy

---

From: Julian Reschke <[email-masked]>
Date: Mon, 19 Aug 2019 13:57:54 +0200

> OK that makes sense indeed.

Now tracked at <https://github.com/httpwg/http-core/issues/235>.

FWIW, I believe this should be set to "held for document update".

Best regards, Julian