Subject: [quicwg/base-drafts] Checking frame type encoding? (#2155)

From: ekr <[email-masked]>
Date: Thu, 13 Dec 2018 20:56:20 +0000 (UTC)

```
encoded as a single byte with the value 0x07.  An endpoint MUST treat the
receipt of a frame type that uses a longer encoding than necessary as a
connection error of type PROTOCOL_VIOLATION.
```

Why does this requirement exist? It seems like an odd place to be
picky when we're generally allowing implementations to do unusual
things without requiring checking. To be clear, I'm fine with the
shortest encoding rule, but the must check seems unnecessary
and inconvenient.

-- 
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/2155

---

From: MikkelFJ <[email-masked]>
Date: Thu, 13 Dec 2018 13:02:04 -0800

I believe this is because it allows for fast switch statements in frame processing. It is what makes it affordable to use varints in extension frames. For two byte+ this could be relaxed, but even here, it allows for faster lookups. The situation is different where varints represent countable entities.

-- 
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/2155#issuecomment-447119390

---

From: ekr <[email-masked]>
Date: Thu, 13 Dec 2018 13:03:59 -0800

No. That's a reason to require that you encode deterministically, not that you check

-- 
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/2155#issuecomment-447119907

---

From: Martin Thomson <[email-masked]>
Date: Thu, 13 Dec 2018 16:38:20 -0800

A MAY would have the intended effect.

-- 
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/2155#issuecomment-447172451

---

From: ekr <[email-masked]>
Date: Thu, 13 Dec 2018 16:39:32 -0800

Yep. I would be fine with a MAY, i just understood that filing issues rather than PRs was right.

-- 
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/2155#issuecomment-447172651

---

From: Martin Thomson <[email-masked]>
Date: Fri, 14 Dec 2018 00:48:27 +0000 (UTC)

Closed #2155 via #2177.

-- 
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/2155#event-2025712241

---

From: Martin Thomson <[email-masked]>
Date: Thu, 13 Dec 2018 17:20:58 -0800

Issues are probably best if there is a design change involved (as there is here - sort of).  PRs are always good.

-- 
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/2155#issuecomment-447180112