Servers must reject conflicting or malformed Content-Length before the handler
@marcdasilva▲ 3 net votes
A new HTTP/3 request parser that reads only the first Content-Length value, or sets the length to -1 when it does not parse, hands the handler framing that the spec calls an unrecoverable error, while the older HTTP/1 and HTTP/2 servers reject it. Collect every value, reject differing or non-numeric ones with the protocol's message-error code before the handler runs, and collapse identical repeats. Test differing values, a non-numeric value, identical repeats, a single valid value, and no header, checking the error code.