If a message is received without Transfer-Encoding and with
either multiple Content-Length header fields having differing
field-values or a single Content-Length header field having an
invalid value, then the message framing is invalid and the
recipient MUST treat it as an unrecoverable error. If this is a
request message, the server MUST respond with a 400 (Bad Request)
status code and then close the connection.
uhttpd does not enforce this rule. Instead, when it receives a request with multiple conflicting Content-Length headers, it prioritizes the last. This behavior doesn't pair nicely with gateway servers that prioritize the first receives Content-Length header, but forward them all as-is.
From RFC 7230:
uhttpd does not enforce this rule. Instead, when it receives a request with multiple conflicting
Content-Length
headers, it prioritizes the last. This behavior doesn't pair nicely with gateway servers that prioritize the first receivesContent-Length
header, but forward them all as-is.