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

make the HTTP settings available to the client #4160

Closed
marten-seemann opened this issue Nov 6, 2023 · 3 comments · Fixed by #4355
Closed

make the HTTP settings available to the client #4160

marten-seemann opened this issue Nov 6, 2023 · 3 comments · Fixed by #4355

Comments

@marten-seemann
Copy link
Member

This is needed to correctly implement WebTransport. The client has to check that the server sent the WebTransport setting in SETTINGS, for example.

@tanghaowillow
Copy link
Contributor

tanghaowillow commented Nov 16, 2023

How about adding a new option in http3.RoundTripOpt, for example WaitForSettings, which indicates the client to not send the request until peer's settings frame is received. The http.RoundTripper struct can have a SettingsHandler callback, which will be passed into roundTripperOpts like StreamHijacker, to decide wether to accept the peer's settings.

type RoundTripOpt struct {
    ...
    // If set, the client will not send the request until the settings frame is received on the control stream.
    WaitForSettings bool
}

type RoundTripper struct {
    ...
    // If non-nil, it will be called once the settings frame is received.
    // If a non-nil error is returned, the request will not be sent and the client will close the QUIC
    // connection with an ErrCodeSettingsError.
    SettingsHandler(*settingsFrame) error
    ...
}

@tanghaowillow
Copy link
Contributor

@marten-seemann could you share your view on this? really want to get this done and make the work on http/3 datagram and WebTransport move forward.

@marten-seemann
Copy link
Member Author

Currently on vacation, so it will be some time until I can comment here.

I don’t think this issue is needed for datagram support in WebTransport though, since datagrams are a requirement for the protocol anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants