h2
h2 copied to clipboard
Support SendResponse::send_continue
Support for Expect: 100-continue
is mandated as MUST by
https://datatracker.ietf.org/doc/html/rfc7231#section-5.1.1. Yet servers
built on h2
cannot currently support this requirement.
One example of such usage, is hyper #2743.
This approach adds a send_continue
method to SendResponse
that a server
application can use to implement support itself. This PR does not solve
the feature itself, it merely provides sufficient support for a server
application to implement the functionality as desired.
One possible alternate solution, could be to implement more of the functionality directly, by hooking up the first attempt to read the request-body, as a signal to send 100-continue
, if the header was there on the Request. Ideally, that would be implemented in Request::into_body
, or add the behavior to the first call of RecvStream::poll_data
. However, it seemed more invasive than I'd like it to be, and I didn't manage to wire it up in an acceptable way anyways.
Thank you :pray: for a good and clear review. I've changed the according to the feedback.
Ping
Ping
Ping @seanmonstar
Maybe @LucioFranco have some time for a review? :pray:
Any progress? It's an important feature
@seanmonstar This is ready for a new review, do you have anytime to do it?