Context
Based on some limited experimentation, it appears that Fly’s HTTP proxy/routing layer does not support HTTP trailers. Is that correct? If so, are there any plans to support HTTP trailers, or any tweaks I can make to fly.toml?
As always with the slightly more obscure corners of the HTTP spec(s), this may well be user and/or programmer error on my part, but I’m hoping someone can shed light on the behavior I’m seeing!
Experiment
Here’s the lightweight experiment I’m doing, where I’m seeing different (but equally “broken” from my POV) behavior when making a request via HTTP 1.1 vs HTTP 2:
Using HTTP 1.1
Example request:
curl -s -v --raw --no-buffer --http1.1 'https://httpbingo.org/trailers?trailer1=value1&trailer2=value2'
Observed behavior:
- The expected
Trailer
andTransfer-Encoding: chunked
headers are included in the response< trailer: trailer1 < trailer: trailer2 < transfer-encoding: chunked
- … but the actual trailers are missing after the response body.
Using HTTP 2
Example request:
curl -s -v --raw --no-buffer --http2 'https://httpbingo.org/trailers?trailer1=value1&trailer2=value2'
Observed behavior:
- None of the expected
Trailer:
orTransfer-Encoding: chunked
headers are present in the response - No trailer values appear after response body.
Extra details
In case it helps, httpbingo.org’s fly.toml file (and other source code) can be seen here in mccutchen/httpbingo.org on GitHub.
That app is a thin Fly-specific wrapper around mccutchen/go-httpbin, where the /trailers
endpoint I’m using to test has a fairly minimal and hopefully straightforward implementation. (If there’s something obviously wrong with that implementation, I’d be eager to learn and fix it!)