Subject: RST_STREAM and FINAL flag

From: Martin Thomson <[email-masked]>
Date: Thu, 25 Apr 2013 12:12:33 -0700

James raised this:

https://github.com/http2/http2-spec/issues/77

"... what is not explicitly stated anywhere in the draft is that the
FINAL flag for the RST_STREAM frame MUST be set. Likewise with
GOAWAY..."

I don't think that it matters what the FINAL flag says for RST_STREAM
- processing the frame closes the stream in totality, so whether the
stream gets half-closed in the process is largely irrelevant.  Same
for GOAWAY.

Also, "what happens if an endpoint sends a RST_STREAM with stream
identifier #0 ? "

My take: this is very bad.  Don't do that, but if you do see it, then
it's a PROTOCOL_ERROR.

---

From: James M Snell <[email-masked]>
Date: Thu, 25 Apr 2013 12:17:15 -0700

> stream gets half-closed in the process is largely irrelevant.  Same

+1 ... for completeness, the definition of the RST_STREAM and GOAWAY
frames can say that the FINAL flag is to be ignored in all cases
because the frames themselves are terminal in nature.

> My take: this is very bad.  Don't do that, but if you do see it, then

Agreed.

- James

---

From: Jeff Pinner <[email-masked]>
Date: Thu, 25 Apr 2013 12:21:41 -0700

> because the frames themselves are terminal in nature.
GOAWAY and RST_STREAM have different semantics -- but I would note that
RST_STREAM is different than FINAL because it puts the stream in a closed
state and not half-closed and thus behaves differently when
the initiator of the stream sends it (RST_STREAM w/ CANCEL for example)

---

From: Martin Thomson <[email-masked]>
Date: Thu, 25 Apr 2013 12:31:29 -0700

>> because the frames themselves are terminal in nature.

Agreed, clarification == good.

On 25 April 2013 12:21, Jeff Pinner <[email-masked]> wrote:
> state and not half-closed and thus behaves differently when the initiator of
> the stream sends it (RST_STREAM w/ CANCEL for example)

Absolutely.  The initiator can abandon a stream, and RST_STREAM
signals three things: I wont send any more, what I sent isn't
complete, and don't send me any more.  FINAL covers only the first
part of that.

But I don't see how those differences are relevant to this case.  Can
you expand?

---

From: James M Snell <[email-masked]>
Date: Fri, 26 Apr 2013 10:30:44 -0700

I have an edit for this in my local fork. I will submit a pull request
later today that can be reviewed.