Re: REFUSED_STREAM and CANCEL

Martin Thomson <martin.thomson@gmail.com> Tue, 26 March 2013 20:57 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 1B6D321F8C67 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 26 Mar 2013 13:57:41 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.499
X-Spam-Level:
X-Spam-Status: No, score=-10.499 tagged_above=-999 required=5 tests=[AWL=0.100, 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 oPBEyG5pPqBS for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 26 Mar 2013 13:57:40 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 61F7F21F8CAE for <httpbisa-archive-bis2Juki@lists.ietf.org>; Tue, 26 Mar 2013 13:57:40 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1UKauz-0001nj-29 for ietf-http-wg-dist@listhub.w3.org; Tue, 26 Mar 2013 20:56:29 +0000
Resent-Date: Tue, 26 Mar 2013 20:56:29 +0000
Resent-Message-Id: <E1UKauz-0001nj-29@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <martin.thomson@gmail.com>) id 1UKaun-0001ma-50 for ietf-http-wg@listhub.w3.org; Tue, 26 Mar 2013 20:56:17 +0000
Received: from mail-we0-f176.google.com ([74.125.82.176]) by lisa.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <martin.thomson@gmail.com>) id 1UKaul-0005Av-Sa for ietf-http-wg@w3.org; Tue, 26 Mar 2013 20:56:17 +0000
Received: by mail-we0-f176.google.com with SMTP id s43so2380195wey.21 for <ietf-http-wg@w3.org>; Tue, 26 Mar 2013 13:55:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=2WWw5ngG+Jzgp6DKIxEdRi/4pcT26pDD172XukZ6Blw=; b=dtyTfxH1PTcLj9zj3SYvJ1W5E4deoDzHARaxjb6/nfAny0jOmbG35fjhy4EAHgz5oo vvfV5xf1T/uydQkyD8vGvVCCd2zW+px3DKNH9z+0z8DvGxhIKwa373MH8iIu9aWMBq9K 5WpamS9ZF/VH62z3p2nredmF6VNW7GA+It3eYF5Jur+ctDVUWNCugCPZDMJDM7pZ+y+1 jZmNBbJ05qD7/REUK42HiY4w40+Wn981muo3a3KAyoFIJVaMM3+YNkMLszcCzWYcpF7Q EuA5O2Thes+Y01P+uVDQPipJyC4edMsWz6XpX41jKbI5ivfHQ7yWbNVojepuaDhekSQQ pgvQ==
MIME-Version: 1.0
X-Received: by 10.194.22.5 with SMTP id z5mr27379073wje.5.1364331349546; Tue, 26 Mar 2013 13:55:49 -0700 (PDT)
Received: by 10.194.5.135 with HTTP; Tue, 26 Mar 2013 13:55:49 -0700 (PDT)
In-Reply-To: <CABkgnnWYzB9XixZkGD9F-=sGaWoX6C3Wu0zoVe9K2bJWcBpf0Q@mail.gmail.com>
References: <CABkgnnXtjrZ6rqucN3EToVfV1iaz73RBEbd-D3P9iaSczcqw0Q@mail.gmail.com> <CAA4WUYhU+gtsiAu_gp-aXS1vcme50FkPpCQAmJBqiikmAUAR8Q@mail.gmail.com> <CABkgnnWRLV0Kv-xixfN-4uR=3p5KZu+ynjiO4cV7oguGih_caQ@mail.gmail.com> <CAP+FsNefrP7Sb_4THAPDLUGV0zFOZNRFtfXhAh=RUisvv=bd_A@mail.gmail.com> <CABkgnnWYzB9XixZkGD9F-=sGaWoX6C3Wu0zoVe9K2bJWcBpf0Q@mail.gmail.com>
Date: Tue, 26 Mar 2013 13:55:49 -0700
Message-ID: <CABkgnnWvKKQLVaifJppwgVr=7pYsShgCEYeUGw2nJECr3hHdQg@mail.gmail.com>
From: Martin Thomson <martin.thomson@gmail.com>
To: Roberto Peon <grmocg@gmail.com>
Cc: "William Chan (陈智昌)" <willchan@chromium.org>, HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: text/plain; charset="UTF-8"
Received-SPF: pass client-ip=74.125.82.176; envelope-from=martin.thomson@gmail.com; helo=mail-we0-f176.google.com
X-W3C-Hub-Spam-Status: No, score=-4.4
X-W3C-Hub-Spam-Report: AWL=-1.668, BAYES_00=-1.9, 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: lisa.w3.org 1UKaul-0005Av-Sa 22f1f61bd0530a5a9f4832691aedad59
X-Original-To: ietf-http-wg@w3.org
Subject: Re: REFUSED_STREAM and CANCEL
Archived-At: <http://www.w3.org/mid/CABkgnnWvKKQLVaifJppwgVr=7pYsShgCEYeUGw2nJECr3hHdQg@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/17155
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>

OK, I got it.  This is a new feature that the framing layer offers the
HTTP usage, namely: safely retry non-idempotent requests.

It's not explained especially well, so I've added an issue to track
the creation of a better explanation:

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

On 26 March 2013 13:41, Martin Thomson <martin.thomson@gmail.com> wrote:
> On 26 March 2013 13:28, Roberto Peon <grmocg@gmail.com> wrote:
>>> Bottom line: what do I do differently in response to a refused stream
>>> as opposed to a cancelled one?
>> You (rather, a browser) can automatically send the request again in the case
>> where a non-idempotent method such as POST was used.
>> With cancel, the browser would have to ask the client to confirm before
>> doing so.
>
> Why would the client not retry?  I would have modeled all of these as
> being equivalent to an HTTP/1.1 connection drop (albeit with a nicer
> recovery story).
>
> It might help to examine why a server would send a RST_STREAM w/
> CANCEL.  Here's what I can think of:
>  - server is overloaded, wants to send Retry-After for requests but
> not lose the connection
>  - resource disappeared or changed mid-response
>  - an upstream connection or request broke
>
> Anything else?  Because I can't see why retry is a bad idea in any of
> these cases, subject to the normal restrictions (idempotence, stream
> availability, etc...).