Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expect: 100-continue not implemented for HTTP/2 #2743

Open
rawler opened this issue Jan 30, 2022 · 3 comments
Open

Expect: 100-continue not implemented for HTTP/2 #2743

rawler opened this issue Jan 30, 2022 · 3 comments
Labels
A-http2 Area: HTTP/2 specific. A-server Area: server. C-bug Category: bug. Something is wrong. This is bad! E-medium Effort: medium. Some knowledge of how hyper internal works would be useful.

Comments

@rawler
Copy link

rawler commented Jan 30, 2022

Hyper (server) does not support sending 100 Continue upon receiving an HTTP/2 request with a Expect: 100-continue specified. This is currently blocking moving a project from HTTP/1.1 to HTTP2 for me.

I've been digging through the specs, and as far as I can tell;

HTTP's existing semantics remain unchanged.

An origin server MUST, upon receiving an HTTP/1.1 (or later)
request-line and a complete header section that contains a
100-continue expectation and indicates a request message body will
follow, either send an immediate response with a final status code,
if that status can be determined by examining just the request-line
and header fields, or send an immediate 100 (Continue) response to
encourage the client to send the request's message body. The origin
server MUST NOT wait for the message body before sending the 100
(Continue) response.

I think the simple solution here is to try to replicate the behavior hyper already expose for HTTP/1.1? #838

@rawler rawler added the C-bug Category: bug. Something is wrong. This is bad! label Jan 30, 2022
@rawler
Copy link
Author

rawler commented Jan 30, 2022

I'm not sure about the "bug" label, but given the emphasis on correct by Hyper, and this is technically breaking spec I chose "bug" over "feature request". Feel free to change if there is some better convention.

@seanmonstar seanmonstar added A-http2 Area: HTTP/2 specific. A-server Area: server. E-medium Effort: medium. Some knowledge of how hyper internal works would be useful. labels Jan 31, 2022
@seanmonstar
Copy link
Member

Yep, sounds like a good thing to add!

@rawler
Copy link
Author

rawler commented Feb 3, 2022

I started looking into it myself, by adding send_continue-method to H2, but I've gotten stuck on writing an integration-test for it. For some reason, despite client.send_frame(frames::data(1, "hello world").eos()) succeeding, reading the request-body in the server task fails. rawler/h2@d4cf463

rawler added a commit to rawler/h2 that referenced this issue Feb 4, 2022
rawler added a commit to rawler/h2 that referenced this issue Feb 4, 2022
rawler added a commit to rawler/h2 that referenced this issue Feb 4, 2022
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](hyperium/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.
rawler added a commit to rawler/h2 that referenced this issue May 2, 2022
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](hyperium/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.
rawler added a commit to rawler/h2 that referenced this issue Oct 13, 2024
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](hyperium/hyper#2743).

This approach adds a `send_info` 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.
rawler added a commit to rawler/h2 that referenced this issue Oct 13, 2024
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](hyperium/hyper#2743).

This approach adds a `send_info` 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-http2 Area: HTTP/2 specific. A-server Area: server. C-bug Category: bug. Something is wrong. This is bad! E-medium Effort: medium. Some knowledge of how hyper internal works would be useful.
Projects
None yet
Development

No branches or pull requests

2 participants