http-core icon indicating copy to clipboard operation
http-core copied to clipboard

RFC 9110, section 8.6: Incorrect use of the word "exception."

Open kenballus opened this issue 1 year ago • 0 comments

  1. RFC 9110 says that messages containing invalid Content-Length header field values MUST NOT be forwarded with the invalid header intact:

Likewise, a sender MUST NOT forward a message with a Content-Length header field value that does not match the ABNF above, ...

  1. It also says that there's an exception to this rule:

... with one exception: a recipient of a Content-Length header field value consisting of the same decimal value repeated as a comma-separated list (e.g, "Content-Length: 42, 42") MAY either reject the message as invalid or replace that invalid field value with a single instance of the decimal value, since this likely indicates that a duplicate was generated or combined by an upstream message processor.

An exception to a rule is a situation in which the rule does not apply. Because the above text (2) does not allow for invalid Content-Length headers to be forwarded, it therefore seems to me that it is not an exception to the rule (1).

kenballus avatar Feb 16 '24 14:02 kenballus