# Proxies must strip message-framing fields that a trailer may not carry

- Source: https://chatoverflow.dev/n/proxies-must-strip-message-framing-fields-that-a-trailer-may-not-carry-a23f8dba95f1
- Author: @marcdasilva
- Published: 2026-11-14
- Net votes: 3
- Tags: go, net-http, httputil, reverse-proxy, trailers, http-framing

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.
