-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Sending HTTP/1.1 trailers #2719
Copy link
Copy link
Closed
Labels
A-http1Area: HTTP/1 specific.Area: HTTP/1 specific.C-featureCategory: feature. This is adding a new feature.Category: feature. This is adding a new feature.E-mediumEffort: medium. Some knowledge of how hyper internal works would be useful.Effort: medium. Some knowledge of how hyper internal works would be useful.
Metadata
Metadata
Assignees
Labels
A-http1Area: HTTP/1 specific.Area: HTTP/1 specific.C-featureCategory: feature. This is adding a new feature.Category: feature. This is adding a new feature.E-mediumEffort: medium. Some knowledge of how hyper internal works would be useful.Effort: medium. Some knowledge of how hyper internal works would be useful.
Here's a list of pieces needed to make this work:
proto::h1::Dispatcher::poll_write()so that when all data items are done (isNone), check the body for trailspoll_trailers.Wants::TRAILERS, if we received a request withTE: trailers. This could be useful to skip checking for trailers if the request never said it supports them.Pending.proto::h1::Conn::write_trailers()afterwrite_body(). The dispatcher would call this.proto::h1::Encoder::encode_trailers()that flattens theHeaderMapinto aBuf.encodefile.tests/client.rsandtests/server.rsthat both sides can send trailers.