-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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.
Description
Here's a list of pieces needed to make this work:
- Update
proto::h1::Dispatcher::poll_write()
so that when all data items are done (isNone
), check the body for trailspoll_trailers
.- It might be we want to add some state to the dispatcher like
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. - It's likely that new state will need to be added, in case the data is done, but polling the trailers is
Pending
.
- It might be we want to add some state to the dispatcher like
- Add
proto::h1::Conn::write_trailers()
afterwrite_body()
. The dispatcher would call this. - Add
proto::h1::Encoder::encode_trailers()
that flattens theHeaderMap
into aBuf
.- A few unit tests for encoding trailers in the
encode
file.
- A few unit tests for encoding trailers in the
- A couple tests, at least one in each of
tests/client.rs
andtests/server.rs
that both sides can send trailers.
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.