Subject: [quicwg/base-drafts] HTTP/3 frame encodings are unnecessarily difficult to serialize and parse (#2396)

From: ianswett <[email-masked]>
Date: Wed, 30 Jan 2019 15:42:30 -0800

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.

Related to #2395

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/2396

---

From: Lucas Pardue <[email-masked]>
Date: Wed, 30 Jan 2019 16:16:51 -0800

If we want to do this, we should still mandate that all extension frames
have a length, so endpoints can easily skip over them

On Thu, 31 Jan 2019, 08:42 ianswett <[email-masked] wrote:

> 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?).
>
> 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.
>
> Related to #2395 <https://github.com/quicwg/base-drafts/issues/2395>
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/quicwg/base-drafts/issues/2396>, or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AGRFtSXbUdtdRyi8ayoXbmMiMe6muzujks5vIi3mgaJpZM4abScO>
> .
>

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/2396#issuecomment-459163963

---

From: David Schinazi <[email-masked]>
Date: Wed, 30 Jan 2019 16:53:00 -0800

@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

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/2396#issuecomment-459171364

---

From: Lucas Pardue <[email-masked]>
Date: Wed, 30 Jan 2019 17:02:14 -0800

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

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/2396#issuecomment-459173340

---

From: ianswett <[email-masked]>
Date: Wed, 30 Jan 2019 17:06:15 -0800

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

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/2396#issuecomment-459174170

---

From: Mike Bishop <[email-masked]>
Date: Wed, 30 Jan 2019 21:15:14 -0800

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.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/2396#issuecomment-459218606

---

From: Mike Bishop <[email-masked]>
Date: Wed, 30 Jan 2019 21:15:15 -0800

Closed #2396.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/2396#event-2108452477