Re: REFUSED_STREAM and CANCEL

Martin Thomson <martin.thomson@gmail.com> Tue, 26 March 2013 20:43 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 E626621F8574 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 26 Mar 2013 13:43:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.599
X-Spam-Level:
X-Spam-Status: No, score=-10.599 tagged_above=-999 required=5 tests=[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 N9-lU7mea3rf for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 26 Mar 2013 13:43:13 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 2312C21F8566 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Tue, 26 Mar 2013 13:43:13 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1UKahK-0001cr-Eg for ietf-http-wg-dist@listhub.w3.org; Tue, 26 Mar 2013 20:42:22 +0000
Resent-Date: Tue, 26 Mar 2013 20:42:22 +0000
Resent-Message-Id: <E1UKahK-0001cr-Eg@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <martin.thomson@gmail.com>) id 1UKah9-0001bz-F5 for ietf-http-wg@listhub.w3.org; Tue, 26 Mar 2013 20:42:11 +0000
Received: from mail-wi0-f181.google.com ([209.85.212.181]) by maggie.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <martin.thomson@gmail.com>) id 1UKah8-0000pM-BN for ietf-http-wg@w3.org; Tue, 26 Mar 2013 20:42:11 +0000
Received: by mail-wi0-f181.google.com with SMTP id hj8so1520673wib.2 for <ietf-http-wg@w3.org>; Tue, 26 Mar 2013 13:41:44 -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=TGWrWArC5z6yBkY1Qm47mgV4Lpv6nZBhimg6MC1uNPs=; b=rWQ38YrTXVqQUUD+eZK7wYc2FguQfTZ7Iow3fs/raqY/Qp6ef0xHpdSLnm3y7mur1l OrFj4GpdhzQ7nzRVhgpEX/iNm4ws4FoSVozBVn15F8Eet5GGRDVma5ijsTpZMuX2B5mO MZ/wylsyRj6PkP2cLA93eJi9v+O4PVKrtMqgni/B+7Wal9ZO5tLl4adjOHCX7msZWY6o zbWL4m1corxPOd90lexVxSB/9vNSesX8HPh9BnsBGaVHPa+MFP9+7AepC+jG5i2kdlfv hnlBhncS9AiZz4vC2aTieLZixyQQOzyeNxAcKPTadn5dIePcBT9RKRkvCCHzYnPTXI5r OnxQ==
MIME-Version: 1.0
X-Received: by 10.180.183.197 with SMTP id eo5mr5656463wic.28.1364330503976; Tue, 26 Mar 2013 13:41:43 -0700 (PDT)
Received: by 10.194.5.135 with HTTP; Tue, 26 Mar 2013 13:41:43 -0700 (PDT)
In-Reply-To: <CAP+FsNefrP7Sb_4THAPDLUGV0zFOZNRFtfXhAh=RUisvv=bd_A@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>
Date: Tue, 26 Mar 2013 13:41:43 -0700
Message-ID: <CABkgnnWYzB9XixZkGD9F-=sGaWoX6C3Wu0zoVe9K2bJWcBpf0Q@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=209.85.212.181; envelope-from=martin.thomson@gmail.com; helo=mail-wi0-f181.google.com
X-W3C-Hub-Spam-Status: No, score=-4.4
X-W3C-Hub-Spam-Report: AWL=-1.721, 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: maggie.w3.org 1UKah8-0000pM-BN 095c86e1458c8dc48d495f63faa12b21
X-Original-To: ietf-http-wg@w3.org
Subject: Re: REFUSED_STREAM and CANCEL
Archived-At: <http://www.w3.org/mid/CABkgnnWYzB9XixZkGD9F-=sGaWoX6C3Wu0zoVe9K2bJWcBpf0Q@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/17154
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>

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...).