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

Second SETTINGS frame on any stream other than the control stream error #2706

Closed
DaanDeMeyer opened this issue May 16, 2019 · 4 comments · Fixed by #2710
Closed

Second SETTINGS frame on any stream other than the control stream error #2706

DaanDeMeyer opened this issue May 16, 2019 · 4 comments · Fixed by #2710

Comments

@DaanDeMeyer
Copy link
Contributor

SETTINGS frames always apply to a connection, never a single stream. A SETTINGS frame MUST be sent as the first frame of each control stream (see Section 4.2.1) by each peer, and MUST NOT be sent subsequently or on any other stream. If an endpoint receives a SETTINGS frame on a different stream, the endpoint MUST respond with a connection error of type HTTP_WRONG_STREAM. If an endpoint receives a second SETTINGS frame, the endpoint MUST respond with a connection error of type HTTP_UNEXPECTED_FRAME.

It's unclear which error should be reported if an endpoint receives a second SETTINGS frame on any stream that's not a control stream. Perhaps this should be explicitly defined in the draft?

LPardue added a commit to LPardue/base-drafts that referenced this issue May 16, 2019
Fixes quicwg#2706 by clearly splitting the two different error cases.
@LPardue
Copy link
Member

LPardue commented May 16, 2019

Hey @DaanDeMeyer.

I initially thought this was an editorial problem so created #2710 as an attempt to clarify things.

However, I think the question is more philosophical. To analyse it a bit, what you're asking is how to handle an error after the occurrence of a critical connection error. First, a SETTINGS frame on a wrong stream type, then another SETTINGS frame on a wrong stream.

After the first critical error, all bets are off. I'd expect a lot implementations to just give up at that stage as the peer is likely to be misbehaving.

@DaanDeMeyer
Copy link
Contributor Author

I agree its an edge case but I do think it'd be useful to exactly specify which of the two errors should be reported, especially when thinking of automated testing of HTTP/3 implementations.

@LPardue
Copy link
Member

LPardue commented May 16, 2019

I'm sympathetic to that but I fear this could be a slippery slope towards adding lots of text for issues that occur after a critical close event. PRIORITY frames fall into a similar bucket, along with many of the server push frames and their validation rules.

MikeBishop pushed a commit to LPardue/base-drafts that referenced this issue May 16, 2019
Fixes quicwg#2706 by clearly splitting the two different error cases.
MikeBishop pushed a commit that referenced this issue May 16, 2019
Fixes #2706 by clearly splitting the two different error cases.
@MikeBishop
Copy link
Contributor

I think the real unclarity in the spec is that both can happen simultaneously. After receiving a proper SETTINGS frame on the control channel, receiving a SETTINGS frame on some other stream would be both a second SETTINGS frame and a SETTINGS frame on the wrong stream. #2710 clarifies this reasonable. Thanks, both of you!

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

Successfully merging a pull request may close this issue.

3 participants