Adding support for HTTP trailing headers in chunked requests

Wesley Pereira wesley_pereira at
Fri May 27 14:35:30 UTC 2016

Are there any plans to support HTTP trailing headers in chunked requests as per

If not, we would be interested in sending a patch for adding support. It looks like we would modify ngx_http_parse_chunked and refactor ngx_http_parse_header_line so we can reuse it for parsing trailing headers. And then have a directive to whitelist which trailing headers to allow.
When the request is proxied upstream, if it’s fully buffered we could add the trailing header as a request header. If it’s unbuffered, then just proxy them as trailing headers. And we would only include the whitelisted headers.

Does this sound like a reasonable approach? What are the chances of accepting such a patch.


More information about the nginx-devel mailing list