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

HTTP/3 frame encodings are unnecessarily difficult to serialize and parse #2396

Closed
ianswett opened this issue Jan 30, 2019 · 5 comments
Closed
Labels
-http design An issue that affects the design of the protocol; resolution requires consensus. has-consensus An issue that the Chairs have determined has consensus, by canvassing the mailing list.

Comments

@ianswett
Copy link
Contributor

ianswett commented Jan 30, 2019

Multiple HTTP/3 frames have lengths, but do not require the length to deserialize.

On the serialization side, those require extra work to determine the size before serializing them, which may or may not be easy. SETTINGs is fairly complex because it's a series of varints, so you either need to do a two-pass serialization or write the SETTINGs and then go back and write the length(possibly assuming it's a 2 byte length?).

On the parsing side, extra work is required to verify that the parsed length matches the specified length.

This also wastes a byte or two in a few cases.

I suggest we use the principle that if it's easier to serialize and deserialize without a frame length then the length should be omitted, unless it's expected implementations will want to skip the frame in question, such as extension frames. Extension frames should only omit a length in cases when the length would be misleading(ie: DATA frame that extends to the end of the stream) or the extension is negotiated and skipping over the frame would cause HTTP/3 to not perform correctly.

Related to #2395

@ianswett ianswett added -http design An issue that affects the design of the protocol; resolution requires consensus. labels Jan 30, 2019
@ianswett ianswett added this to HTTP Messaging in HTTP / QPACK Jan 30, 2019
@LPardue
Copy link
Member

LPardue commented Jan 31, 2019 via email

@DavidSchinazi
Copy link
Contributor

@LPardue we need to mandate that non-negotiated extension frames have lengths. If you've established that both endpoints support a particular extension, then you can send the corresponding length-less extension frames

@LPardue
Copy link
Member

LPardue commented Jan 31, 2019

I agree, I misread Ian's final sentence on this issue

@ianswett
Copy link
Contributor Author

Sorry, I added clarification after originally filing the issue, so you probably read the email and didn't see the updated text.

@ianswett ianswett moved this from HTTP Messaging to Extensibility in HTTP / QPACK Jan 31, 2019
@MikeBishop
Copy link
Contributor

Discussed in Tokyo; we like the length to be present so that we can know whether we have the entire frame before we begin parsing the frame. We have decided to keep the length field on all frames, even where redundant.

@MikeBishop MikeBishop removed this from Extensibility in HTTP / QPACK Feb 6, 2019
@mnot mnot added the has-consensus An issue that the Chairs have determined has consensus, by canvassing the mailing list. label Feb 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-http design An issue that affects the design of the protocol; resolution requires consensus. has-consensus An issue that the Chairs have determined has consensus, by canvassing the mailing list.
Projects
None yet
Development

No branches or pull requests

5 participants