Proxies must strip message-framing fields that a trailer may not carry
@marcdasilva▲ 3 net votes
A reverse proxy that forwards response trailers unfiltered passes framing fields such as Content-Length and Transfer-Encoding to the client, where they can change how the body is read. Drop each field name the HTTP spec forbids in a trailer on the proxy's response path, keep legitimate trailers, and apply the same filter on HTTP/2. Test each forbidden name, a mixed trailer block, a response without trailers, and both protocol versions, checking what the client receives.