Subject: [quicwg/base-drafts] Grease HTTP error codes (#3360)

From: Mike Bishop <[email-masked]>
Date: Fri, 17 Jan 2020 12:55:41 -0800

Fixes #3325.

Pleasantly, the same formula we&#39;ve used for grease values elsewhere in HTTP/3 does not collide with any currently-assigned error code, so I&#39;ve just reused it.  (We&#39;ll need to be caution about 0x119, though.)  The same logic could be applied to transport error codes, but there&#39;s not much point.  If you&#39;re intolerant of the way your peer closed the connection, you might erroneously... close the connection?

Editorial-ish:  A recommendation which reserves some error code space we haven&#39;t used; modifies the IANA instructions.  Doesn&#39;t mandate or prohibit anything new.
You can view, comment on, or merge this pull request online at:

  https://github.com/quicwg/base-drafts/pull/3360

-- Commit Summary --

  * Grease error codes

-- File Changes --

    M draft-ietf-quic-http.md (13)

-- Patch Links --

https://github.com/quicwg/base-drafts/pull/3360.patch
https://github.com/quicwg/base-drafts/pull/3360.diff

-- 
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/pull/3360

---

From: Martin Thomson <[email-masked]>
Date: Sun, 19 Jan 2020 22:01:38 -0800

martinthomson commented on this pull request.

Looks fine to me.  I wonder how much this will end up doing anything...

> @@ -1458,6 +1460,11 @@ H3_VERSION_FALLBACK (0x110):
 : The requested operation cannot be served over HTTP/3.  The peer should
   retry over HTTP/1.1.
 
+Error codes of the format `0x1f * N + 0x21` for integer values of N are reserved
+to exercise the requirement that unknown error codes be ignored

"ignored" or "treated as equivalent to "HTTP3_NO_ERROR" ?

-- 
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/pull/3360#pullrequestreview-345092266

---

From: Lucas Pardue <[email-masked]>
Date: Mon, 20 Jan 2020 06:50:12 -0800

LPardue approved this pull request.

-- 
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/pull/3360#pullrequestreview-345358712

---

From: ianswett <[email-masked]>
Date: Mon, 20 Jan 2020 11:36:17 -0800

ianswett approved this pull request.

LG, but I think it's worth accepting Martin's suggestion.

-- 
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/pull/3360#pullrequestreview-345502111

---

From: Mike Bishop <[email-masked]>
Date: Mon, 20 Jan 2020 13:29:48 -0800

@MikeBishop pushed 1 commit.

8b531360eba563c4db985450a278ee3b69d09c9b  Don't ignore Martin!

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/3360/files/0a186768e71097e48d665236bfd28027175100f8..8b531360eba563c4db985450a278ee3b69d09c9b

---

From: Jana Iyengar <[email-masked]>
Date: Mon, 20 Jan 2020 16:26:06 -0800

janaiyengar commented on this pull request.

> @@ -925,7 +925,9 @@ transferred. Endpoints MUST NOT consider these streams to have any meaning upon
 receipt.
 
 The payload and length of the stream are selected in any manner the
-implementation chooses.
+implementation chooses.  Implementations MAY terminate these streams cleanly,
+or MAY abruptly terminate them with an error code of the implementation's
+choice, including reserved error codes ({{http-error-codes}}).

This allows error codes here that might tear down the entire connection – did you mean to allow that?

-- 
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/pull/3360#pullrequestreview-345580886

---

From: Lucas Pardue <[email-masked]>
Date: Mon, 20 Jan 2020 16:36:01 -0800

LPardue commented on this pull request.

 receipt.

I dont think that's the case. Closing a grease stream cleanly or abruptly should not be any cause for an H3 level connection error

-- 
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/pull/3360#discussion_r368767483

---

From: Jana Iyengar <[email-masked]>
Date: Mon, 20 Jan 2020 16:48:17 -0800

receipt.

I agree, but this text allows for an implementation to use any error code. The peer could be wired to close the connection on some of these errors, irrespective of stream (H3_CLOSED_CRITICAL_STREAM perhaps). It might be worth stating that the endpoint MUST NOT close the connection on any error on these streams.

-- 
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/pull/3360#discussion_r368769452

---

From: Lucas Pardue <[email-masked]>
Date: Mon, 20 Jan 2020 17:08:12 -0800

receipt.

I guess you could add that specific clause but we already have a MUST NOT consider these streams to have any meaning. 

Zooming out, this is a slight retread of the "what should I do if an endpoint sends me an unexpected error code?" Q
question. Which I thought had been answered. 

-- 
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/pull/3360#discussion_r368772641

---

From: Jana Iyengar <[email-masked]>
Date: Mon, 20 Jan 2020 17:11:53 -0800

receipt.

The streams may not have meaning, but does that include the errors?

-- 
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/pull/3360#discussion_r368773254

---

From: Lucas Pardue <[email-masked]>
Date: Tue, 21 Jan 2020 05:09:59 -0800

receipt.

We already say https://quicwg.org/base-drafts/draft-ietf-quic-http.html#section-8

> Because new error codes can be defined without negotiation (see Section 9), use of an error code in an unexpected context or receipt of an unknown error code MUST be treated as equivalent to H3_NO_ERROR. However, closing a stream can have other effects regardless of the error code

Closing a stream with the error code H3_CLOSED_CRITICAL_STREAM seems like an unexpected context to me. Martin makes the suggestion above to also treat reserved error values as H3_NO_ERROR.

By defining and exercising grease of error codes, we can help surface naiive implementations that react in the unfortunate way of your example. 

-- 
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/pull/3360#discussion_r368989867

---

From: Mike Bishop <[email-masked]>
Date: Tue, 21 Jan 2020 08:19:44 -0800

MikeBishop commented on this pull request.

 receipt.

As @LPardue says, we only have defined semantics for CLOSED_CRITICAL_STREAM as a connection error.  (And, for that matter, those semantics don't include any action on the receiver's part.)  Receiving it on a stream -- especially a grease stream -- is supposed to have no effect.  If it does, greasing is working.

-- 
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/pull/3360#discussion_r369100624

---

From: Mike Bishop <[email-masked]>
Date: Tue, 21 Jan 2020 15:40:45 -0800

8bf2515a7300e4e6447273d3c146580450c84d19  Constrain recommendation on grease streams

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/3360/files/8b531360eba563c4db985450a278ee3b69d09c9b..8bf2515a7300e4e6447273d3c146580450c84d19

---

From: Mike Bishop <[email-masked]>
Date: Tue, 21 Jan 2020 15:42:52 -0800

Constraining the recommendation on grease streams, because sending *any* error code potentially generates an error code that has semantics to your peer of which you are unaware.

-- 
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/pull/3360#issuecomment-576939120

---

From: Mike Bishop <[email-masked]>
Date: Tue, 21 Jan 2020 15:43:18 -0800

Merged #3360 into master.

-- 
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/pull/3360#event-2968192417