httpwg / http-core

Core HTTP Specifications
https://httpwg.org/http-core/
469 stars 43 forks source link

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

Open kenballus opened 9 months ago

kenballus commented 9 months ago
  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, ...

  2. 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).