RST_STREAM(OK) after an HTTP response

Jeff Pinner <jpinner@twitter.com> Wed, 24 September 2014 15:09 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 (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3905E1A017C for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 24 Sep 2014 08:09:21 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.166
X-Spam-Level:
X-Spam-Status: No, score=-7.166 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.786, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NfDW_68pFYCF for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 24 Sep 2014 08:09:16 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 705251A0180 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 24 Sep 2014 08:09:16 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1XWo95-0007ho-SS for ietf-http-wg-dist@listhub.w3.org; Wed, 24 Sep 2014 15:06:19 +0000
Resent-Date: Wed, 24 Sep 2014 15:06:19 +0000
Resent-Message-Id: <E1XWo95-0007ho-SS@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <jpinner@twitter.com>) id 1XWo8g-0007dn-FQ for ietf-http-wg@listhub.w3.org; Wed, 24 Sep 2014 15:05:54 +0000
Received: from mail-ob0-f174.google.com ([209.85.214.174]) by maggie.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <jpinner@twitter.com>) id 1XWo8f-0002AL-4l for ietf-http-wg@w3.org; Wed, 24 Sep 2014 15:05:54 +0000
Received: by mail-ob0-f174.google.com with SMTP id m8so6503513obr.5 for <ietf-http-wg@w3.org>; Wed, 24 Sep 2014 08:05:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=twitter.com; s=google; h=mime-version:date:message-id:subject:from:to:content-type; bh=LKN8RazVS4eQiriZGlV1oLVUmzKoNtrZstOAFE44BdA=; b=IjI/zIgqMgXaPpU1dPXwL0k2t7kSmZv8QPxScd+2LI67mrcydnPSyG1J3KaY4JsOLw zDKrYKJ5HZqG/u8ditgVGaF2sD+lYUjmxfz+C0jn1Qo1gsP5gskyr1/G2+oWKcc5RDG9 BZyGT5lYgFT55mY9sJjjIZTJ3jb0lzAplUb8Y=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=LKN8RazVS4eQiriZGlV1oLVUmzKoNtrZstOAFE44BdA=; b=DncWbzMkKrhbfKvnWXUnVKScdi/IyK3zfFqweOM2E7rP3Wf/z6CxA7C+8Vt7UOroM1 QDs2bqBZIB6vSeR3ND6OykZAyn7WyMXsIowDvELjBVGmD/HCmDsRY8IQ7Ea7fuINDK59 3IpsXQrzSaIpBE85N5mco+mgdVlQ1jDnCouYgsI2E+1f0A9xRlwgcXGw+m070cOtthIr Cr5FmNUIdmDWW+vBR0ONtjFT4MzIxLCK0HU/Bs7gUxuJ6VEW5kPfl8EHWPdeWPrLOQRq 9cHCVdo6YFFP8IivglZd+dv+2KXLkS7DU5vMfxQYdjqau3lr+21+L1yrJWyj2aWJPYAP fhCg==
X-Gm-Message-State: ALoCoQnqORwuM0fAo6g2h/VYPczTlRUQvJ8H+i4UO7c0aYSKMbK3Df9W4vMlyAqMFGRts2n4SDWx
MIME-Version: 1.0
X-Received: by 10.182.200.166 with SMTP id jt6mr7274871obc.1.1411571126929; Wed, 24 Sep 2014 08:05:26 -0700 (PDT)
Received: by 10.182.29.65 with HTTP; Wed, 24 Sep 2014 08:05:26 -0700 (PDT)
Date: Wed, 24 Sep 2014 08:05:26 -0700
Message-ID: <CA+pLO_imrE=aH2bB9pzLp9BjWatnpXo6tZKHvsv_opfeh6j5vg@mail.gmail.com>
From: Jeff Pinner <jpinner@twitter.com>
To: HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: text/plain; charset="UTF-8"
Received-SPF: pass client-ip=209.85.214.174; envelope-from=jpinner@twitter.com; helo=mail-ob0-f174.google.com
X-W3C-Hub-Spam-Status: No, score=-3.9
X-W3C-Hub-Spam-Report: AWL=-3.099, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001
X-W3C-Scan-Sig: maggie.w3.org 1XWo8f-0002AL-4l a1d41a756e100a5e28738148c1db5c3a
X-Original-To: ietf-http-wg@w3.org
Subject: RST_STREAM(OK) after an HTTP response
Archived-At: <http://www.w3.org/mid/CA+pLO_imrE=aH2bB9pzLp9BjWatnpXo6tZKHvsv_opfeh6j5vg@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/27219
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>

A server may respond to a request without completely reading the
message body. As an example, consider returning 403 Forbidden to a
large POST request.

In HTTP/2, the server would send a HEADERS frame containing the 403
response with the END_STREAM flag set, leaving the stream in the
half-closed (local) state.

My intuition is to follow up the response with a RST_STREAM (OK) in
order to close the stream entirely if I want to discard the body, but
also want to make sure that the client does not treat this as an error
and considers the response as valid.

The RST_STREAM text state that the frame is for "abnormal termination"
of a stream and that as a receiver it is to indicate rejection,
cancellation, or an error.

I propose that the text around RST_STREAM be clarified that from
something like "abnormal termination" to "abrupt termination" and that
this case be called out as an example in the HTTP mapping section to
make sure implementors treat the HTTP response as valid.


I opened issue https://github.com/http2/http2-spec/issues/618 on github.