Design Issue: Merge RST_STREAM and GOAWAY into a single ERROR frame type

James M Snell <jasnell@gmail.com> Fri, 03 May 2013 20:06 UTC

Return-Path: <ietf-http-wg-request@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 5C85D21F894E for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 3 May 2013 13:06:45 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.512
X-Spam-Level:
X-Spam-Status: No, score=-9.512 tagged_above=-999 required=5 tests=[AWL=1.087, BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LWLvLIfTsbVw for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 3 May 2013 13:06:39 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 1E24421F88D8 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Fri, 3 May 2013 13:06:38 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1UYMEA-00018M-FP for ietf-http-wg-dist@listhub.w3.org; Fri, 03 May 2013 20:05:10 +0000
Resent-Date: Fri, 03 May 2013 20:05:10 +0000
Resent-Message-Id: <E1UYMEA-00018M-FP@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <jasnell@gmail.com>) id 1UYME0-0007zK-01 for ietf-http-wg@listhub.w3.org; Fri, 03 May 2013 20:05:00 +0000
Received: from mail-oa0-f49.google.com ([209.85.219.49]) by maggie.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <jasnell@gmail.com>) id 1UYMDz-0000cy-1y for ietf-http-wg@w3.org; Fri, 03 May 2013 20:04:59 +0000
Received: by mail-oa0-f49.google.com with SMTP id l20so2052006oag.36 for <ietf-http-wg@w3.org>; Fri, 03 May 2013 13:04:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:from:date:message-id:subject:to :content-type; bh=xttkTMcJEh3FnBRC/kaD9dQPfD1oL3JwNdX486byKEY=; b=Xe/TKXzJpvMnPjekBdulLKasKpDTvyAW6IE0Ta6hespQ97VlEWf7332Q6SY9aPV8rA NvfThR1QbZQKQNrFeP129C71fSGHFkfd/NOK2KZSw84WN/dGZkieYeR69tORCNxZoPVJ teFVA+QbUmtBTjYD4DC+i1lpAqLu4iKckVuQYrCZryqz38Ps3IeugqMc+i+MJQilAtx0 YJfXlhP9aUFNXrr0+E1y9cNZeoGgSaJD/whACnsUItUvwAzQJ/Pa5gKl3CIYBKeFPKEk gmyZMLNFOOCUi7UPLbd88mBI4Lv8S/8xnzrpfd8AaJ77EEUMDqJvte7tOrj8bm1nA6Rx RxSQ==
X-Received: by 10.60.92.230 with SMTP id cp6mr3389577oeb.91.1367611473152; Fri, 03 May 2013 13:04:33 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.60.3.137 with HTTP; Fri, 3 May 2013 13:04:12 -0700 (PDT)
From: James M Snell <jasnell@gmail.com>
Date: Fri, 03 May 2013 13:04:12 -0700
Message-ID: <CABP7RbeJm-AKxU3qGxt2tCGrb0xCQL8njNyEToA7Ln9gS8hnTQ@mail.gmail.com>
To: "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Content-Type: text/plain; charset="UTF-8"
Received-SPF: pass client-ip=209.85.219.49; envelope-from=jasnell@gmail.com; helo=mail-oa0-f49.google.com
X-W3C-Hub-Spam-Status: No, score=-3.5
X-W3C-Hub-Spam-Report: AWL=-2.677, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001
X-W3C-Scan-Sig: maggie.w3.org 1UYMDz-0000cy-1y eaf3ca59e941dff1a63b86a8e9ebaa50
X-Original-To: ietf-http-wg@w3.org
Subject: Design Issue: Merge RST_STREAM and GOAWAY into a single ERROR frame type
Archived-At: <http://www.w3.org/mid/CABP7RbeJm-AKxU3qGxt2tCGrb0xCQL8njNyEToA7Ln9gS8hnTQ@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/17809
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

As a simplification, I'd like to suggest that we merge the RST_STREAM
and GOAWAY frames into a single ERROR frame with the following
definition:

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                      Error Code (32)                          |
+---------------------------------------------------------------+
|X|                  Last-Stream-ID (31)                        |
+-+-------------------------------------------------------------+

(note that this flips the field order from the GOAWAY frame)

A frame-specific GOAWAY flag bit (0x2) would be defined for the frame,
and the Last-Stream-ID field would only be included in the frame data
if this flag was set.

This does a couple of things for us:

1. It simplifies the error handling and reduces the number of core frame types.
2. It allows us to terminate a stream and terminate the session in a
single frame if necessary
3. It gives us a way of reporting non-terminal session errors
(currently RST_STREAM is forbidden to use stream id #0 and GOAWAY is
always terminal).