You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add hyper-util helpers to support handling expect: 100-continue header #3833
), it doesn't correctly handle the expect: 100-continue header in the request.
Describe the solution you'd like
Hyper Client needs to wait for the 100 continue response from the S3WSServer after sending the request header parts for certain time and then send the request body if it gets the response from the server or after certain time threshold.
I'm not certain I want to add explicit support inside hyper, because a timeout is needed, and I'd prefer as much as possible that those be done outside of hyper. That doesn't mean we couldn't eventually someday add explicit support, of course. But, in order to support it, it needs two things:
A body which combines waiting for that response or a timeout, whichever comes first.
I think we can provide both, the first one in hyper, and a helper body type in hyper-util which registers a callback and then provides a body wrapper that make use of it and a timmer.
Hi, I am interested in taking over the fix for this issue, seems like expect_continue helper in hyper-util was never added, wondering what direction we want to go for this? From what I can see, maybe small helper in legacy client.rs that will wrap the header itself?
It would need to create a body wrapper, and set the callback. The body would wrap an underlying body, set a timeout, and wait for either the timeout, or for some kind of notification from the callback, before poll_frame would make progress and call the underlying body to begin streaming.
changed the title [-]Update Hyper Client to support handling `expect: 100-continue` header[/-][+]Add hyper-util helpers to support handling `expect: 100-continue` header[/+]on Sep 8, 2026
Activity
seanmonstar commentedon Jan 17, 2025
I'm not certain I want to add explicit support inside hyper, because a timeout is needed, and I'd prefer as much as possible that those be done outside of hyper. That doesn't mean we couldn't eventually someday add explicit support, of course. But, in order to support it, it needs two things:
I think we can provide both, the first one in hyper, and a helper body type in
hyper-utilwhich registers a callback and then provides a body wrapper that make use of it and a timmer.ext::on_informational()callback extension #3818expect_continuehelper inhyper-utilheiwais25 commentedon Jan 17, 2025
Thank you for sharing the earlier discussions and the follow up.
It would be great if the client supports this behavior somehow even though Hyper doesn't have explicit support.
I understand the point of
on_information(), but have some questions about the second one.It seems
hyper-utilusesSendRequesthyper/src/client/conn/http1.rs
Line 221 in 3817a79
Could you share the high level idea about the second one without updating Hyper? I think we ended up updating Hyper.
heiwais25 commentedon Jan 17, 2025
Also, to add few thoughts, I think it makes sense to add it to the Hyper explicitly since it is listed in RFC https://www.rfc-editor.org/rfc/rfc9110#name-expect.
heiwais25 commentedon Jun 25, 2025
Hi, I was able to implement 100 Continue behavior by using
set_on_informational_hookthat you exposed.Thanks! Let me create an example code as an Hyper example. I think it would be helpful reference.
heiwais25 commentedon Jul 7, 2025
Created a new PR to add a new example
Roshyoshi commentedon Jul 17, 2026
Hi, I am interested in taking over the fix for this issue, seems like
expect_continuehelper inhyper-utilwas never added, wondering what direction we want to go for this? From what I can see, maybe small helper in legacyclient.rsthat will wrap the header itself?seanmonstar commentedon Jul 17, 2026
It would need to create a body wrapper, and set the callback. The body would wrap an underlying body, set a timeout, and wait for either the timeout, or for some kind of notification from the callback, before
poll_framewould make progress and call the underlying body to begin streaming.bountis commentedon Aug 18, 2026
Hey, I would love to work on this!
Catwoman08 commentedon Aug 20, 2026
@bountis - Awesome! please see Seanmonstar's thoughts above! If its helpful see https://hyper.rs/contrib/pull-requests/ Looking forward to it!
[-]Update Hyper Client to support handling `expect: 100-continue` header[/-][+]Add hyper-util helpers to support handling `expect: 100-continue` header[/+]