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
Consider making SETTINGS part of the control stream header #2783
Comments
aprops @dtikhonov: One way to remove [HTTP_MISSING_SETTINGS] is to allow not sending the SETTINGS frame at all. By that I meant that if first thing on the control stream isn't SETTINGS, then SETTINGS is not coming, use defaults |
While the proposal is interesting, I think my preference goes to retaining the current design. I agree that HTTP_MISSING_SETTINGS is unnecessary, it is my view that it should be merged to HTTP_UNEXPECTED_FRAME. But once it gets done, it would be my view that the complexity is indifferent; there is no difference in the encoding-side (just sending different series of octets). On the decoding-side, it either having a state that receives series of special octets or a state that receives a particular frame. That said, the reason I prefer using a frame for carrying the settings is because it makes the design consistent. Having a layer that is used for "frame"-ing all the information being exchanged is a good thing. IMO the use of HTTP_UNEXPECTED_FRAME or HTTP_WRONG_STREAM in relation to SETTINGS frame is fine, because use of these errors are the design pattern we use for other frames too. For example, HTTP_UNEXPECTED_FRAME is used to indicate error when the peer sends a DATA frame before a HEADERS frame. Or transmission of a HEADERS frame on the control stream triggers the HTTP_WRONG_STREAM error. I prefer using that same design pattern for everything, rather than creating different rules for the way things are being sent in each state. |
I remembered that we touched on some of this in #2526 Thanks for the feedback @kazuho
Push streams break this pattern but c'est la vie. I think I'm happy to kill this issue/proposal. |
If we took this proposal, we'd be cementing a new pattern: Unidirectional streams might have a header following the type. Push already does (and in London we rejected a proposal to make Push ID behave the way SETTINGS does instead, #2526). I like that pattern, and alongside #2781 this would remove the concept of frame-that-can-only-be-first. That's decidedly appealing. However, we're close to late-stage and this isn't demonstrably better, just arguably cleaner. |
I think that Push Streams is a good argument for pushing this change, although I might argue the Push Streams header is not a length-value structure. I think I'd prefer reusing the type-length-value structure (i.e. frames) for sending SETTINGS rather than defining it's own length-value structure just for one purpose. (not that I care much, but just my two cents) |
I believe the group did not want to make this change so I am closing the issue. @MikeBishop please reopen if I am mistaken. |
Right now we have a SETTINGS frame that can only be sent once (in each direction), and if it is sent it has to be sent at a very precise point (the start of the stream) or the connection is bust.
For these reasons, it strikes me that we could simplify things, in line with today's HTTP/3 design, by unframing settings and placing them as the control stream header. For illustration this would look something like below, where Identifier and Value can be sent multiple times.
For
Against
The arguments for and against seem to net out evenly. Changing control stream seems like a cleaner design to me but shipping is a feature ™️ .
The text was updated successfully, but these errors were encountered: