Subject: [quicwg/base-drafts] Error code for illegal field composition (#4336)

From: Martin Thomson <[email-masked]>
Date: Thu, 05 Nov 2020 14:29:58 -0800

(I couldn't find anything on this, but I'm prepared to be corrected.  Also, it's late, so if this is closed, I'm totally OK with that.)

We're just in the process of doing full validation of pseudo-header fields (I know, seems late, what are you gonna do about that).  And we realized that there is no error code for indicating this sort of error.  That is, if pseudo-fields are out of order, or a request contains `:status`, or there are uppercase characters.

[Section 4.1.1.1](https://quicwg.org/base-drafts/draft-ietf-quic-http.html#section-4.1.1.1) contains lots of MUSTs, but it seems to rely entirely on the definition of "malformed" which leads to H3_GENERAL_PROTOCOL_ERROR.  This is fine, but not especially helpful in isolating problems.

Could we define an error code for this specific case?

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

---

From: Lucas Pardue <[email-masked]>
Date: Thu, 05 Nov 2020 15:59:01 -0800

H2 just says malformed is treated as PROTOCOL_ERROR. So H3 is providing parity.

There might be an argument for more fidelity but I'm not convinced it would help much. It could require more contortions in the text - do you have different error for different types of malformed?

-- 
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/4336#issuecomment-722713467

---

From: Martin Thomson <[email-masked]>
Date: Thu, 05 Nov 2020 18:42:17 -0800

Internally, we use a different error code.  Of course, all internal error codes map to the same code for sending in RESET_STREAM/CONNECTION_CLOSE.

-- 
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/4336#issuecomment-722774503

---

From: Mike Bishop <[email-masked]>
Date: Fri, 06 Nov 2020 08:05:45 -0800

I'm inclined not to do much, if anything, here.  They all trace back to "malformed," as you note, which leads to GENERAL_PROTOCOL_ERROR.  The instances in which we use GPE are:

- Malformed HTTP messages
- Push whose request headers change across multiple promises
- As a substitute for more specific codes

I wouldn't be opposed to splitting the first two off into a new / two new codes, because that would be consistent with our principle of indicating the general area where the failure occurred.  I would push back on having separate error codes for specific ways the message could be malformed, because that's pretty expansive rabbit hole.

-- 
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/4336#issuecomment-723160439

---

From: Martin Thomson <[email-masked]>
Date: Mon, 09 Nov 2020 21:39:21 -0800

OK, I'm satisfied with that response.  I think that we'll just have to signal extra information in the text field.  Happy to close this.

-- 
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/4336#issuecomment-724466753

---

From: Mike Bishop <[email-masked]>
Date: Tue, 10 Nov 2020 05:41:27 -0800

@martinthomson, do you think an error code for "malformed message" would be useful, if we don't go into the various types of malformed?

-- 
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/4336#issuecomment-724708468

---

From: Martin Thomson <[email-masked]>
Date: Tue, 10 Nov 2020 11:16:20 -0800

That might be useful, yes. 

-- 
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/4336#issuecomment-724910398

---

From: Lucas Pardue <[email-masked]>
Date: Tue, 10 Nov 2020 15:25:55 -0800

This is a design change, albeit a marginal one.

-- 
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/4336#issuecomment-725028323