RFC 7231, "Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content", June 2014
Note: This RFC has been obsoleted by RFC 9110Source of RFC: httpbis (app)
Errata ID: 5806
Status: Held for Document Update
Publication Format(s) : TEXT
Reported By: Anders Kaseorg
Date Reported: 2019-08-12
Held for Document Update by: Francesca Palombini
Date Held: 2021-08-23
Section 4.3.7 says:
A server MUST generate a Content-Length field with a value of "0" if no payload body is to be sent in the response.
It should say:
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).
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.