httpcore icon indicating copy to clipboard operation
httpcore copied to clipboard

Add "trailing_headers" extension for HTTP/1.1

Open tomchristie opened this issue 2 years ago • 2 comments

See https://github.com/encode/httpx/issues/1149

Adding support in HTTP/2 should be similar, requiring the h2.TrailersReceived event to populate any trailing headers.

https://python-hyper.org/projects/h2/en/stable/api.html#h2.events.TrailersReceived

tomchristie avatar Sep 29 '22 15:09 tomchristie

Ah gotcha... I see that now yes. The presence of a TE header on the request doesn't matter to h11...

The other headers in RFC 7230 are TE:, Trailer:, and Via:; h11 also supports these in the sense that it ignores them and that’s really all it should be doing.

But yes, it makes sense to include it in the example.

It'd be really nice to have a real URL we can point at for this one. 🤣

tomchristie avatar Sep 29 '22 15:09 tomchristie

Right. Needs a CONNECT and/or Upgrade test case to bump the coverage back to 100%

tomchristie avatar Sep 29 '22 16:09 tomchristie