Summary
- RFC 9112, June 2022, Standards Track, is the HTTP/1.1 message syntax and routing revision. Its sixth section is a precedence list: how a receiver determines where a message body ends.
- Item three is the interesting one. If a message arrives with both
Transfer-EncodingandContent-Length, "the Transfer-Encoding overrides the Content-Length"; such a message "might indicate an attempt to perform request smuggling" and "ought to be handled as an error". - The document then says what to do rather than only what to think: an intermediary that forwards such a message "MUST first remove the received Content-Length field", and a server "MUST close the connection after responding" to a request carrying both.
A byte stream has no edges
HTTP/1.1 runs over a transport that delivers an undelimited sequence of octets. Nothing in TCP marks the end of a request. The protocol therefore has to construct boundaries from headers, and it has several ways to do so: a declared length, a chunked encoding, the end of the connection, or the semantics of the method.
Each mechanism is simple. Together, they create an order of precedence, and an order of precedence is a rule that every participant must interpret the same way.
Two headers that disagree
The awkward case is a message carrying both a length and a transfer encoding. A sender might mean "here is the length, but the body is chunked". A parser that trusts the length reads one boundary; a parser that trusts the chunked encoding reads another.
That gap is the whole mechanism of request smuggling: "a technique that exploits differences in protocol parsing among various recipients to hide additional requests (which might otherwise be blocked or disabled by policy) within an apparently harmless request".
Why it matters when there is a middle
A single server parsing its own traffic can choose any consistent rule. The problem appears when traffic passes through a proxy, a cache or a load balancer, because then one message is parsed twice, by two implementations, and forwarded.
If they disagree, the front end sees one request and the back end sees two. The second one never passed the front end's checks, which is exactly the hidden request the technique describes.
The remedy, which is procedural
RFC 9112 does three things that a description of grammar would not. It fixes the precedence so both parsers must reach the same conclusion. It tells the intermediary to delete the losing header before forwarding, so the ambiguity cannot travel. And it tells the server to close the connection afterwards, so no leftover bytes can be mistaken for the next request.
None of those is elegant. All of them are checkable, which is what a framing rule needs to be.
A specification as a treaty between parsers
The deeper lesson is about what a text protocol's specification is for. It is not only a description of what a compliant message looks like; it is an agreement about how any reader must interpret an ambiguous one, including the readers that were written years earlier.
HTTP/1.1 has been revised for three decades, and this section is what accumulated revision looks like: not new features, but a longer and more explicit contract about the places where the old rules could be read two ways.
Member Briefing
Read the full trend briefing
Members read the full briefing with the source notes behind every finding.
Strategic Circle
A daily briefing in your language, built from changes we have verified.
Join for USD 20/monthCancel anytime.
Members also get the full research library, a daily briefing on the networks they follow and the private forum.






