Re: p2: Expect: 100-continue and "final" status codes

James M Snell <jasnell@gmail.com> Tue, 23 April 2013 15:52 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 AA71421F95DC for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 23 Apr 2013 08:52:10 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.578
X-Spam-Level:
X-Spam-Status: No, score=-10.578 tagged_above=-999 required=5 tests=[AWL=0.021, 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 h2Fyy2aGlrjN for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 23 Apr 2013 08:52:09 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id EA9BF21F95D0 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Tue, 23 Apr 2013 08:52:05 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1UUfVL-0006EB-FH for ietf-http-wg-dist@listhub.w3.org; Tue, 23 Apr 2013 15:51:39 +0000
Resent-Date: Tue, 23 Apr 2013 15:51:39 +0000
Resent-Message-Id: <E1UUfVL-0006EB-FH@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <jasnell@gmail.com>) id 1UUfVH-0006DV-Bh for ietf-http-wg@listhub.w3.org; Tue, 23 Apr 2013 15:51:35 +0000
Received: from mail-ob0-f180.google.com ([209.85.214.180]) by lisa.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <jasnell@gmail.com>) id 1UUfVC-0001rk-OA for ietf-http-wg@w3.org; Tue, 23 Apr 2013 15:51:35 +0000
Received: by mail-ob0-f180.google.com with SMTP id uk5so627620obc.39 for <ietf-http-wg@w3.org>; Tue, 23 Apr 2013 08:51:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=78J1JPCYQkLroDqXx9nNn71pkm3CIStfdCjZjiJzfhQ=; b=UbpMHKMcuYdBkDhrtx+n6aRO+DTt+bc8jMUGYZUQskS15nQ1tXW2XPjkxmIlfujflS dticRkO867s+1LO1E//ufV2qtkJWhOFIkqYQ3WlLShSK0wdcX+reyQP7CE+5f6OzKQ2m haHknc67qKI7q/twSXes06j6JfK/EP4UKMfNgi7I2pC3Ds+gXYHmyrfCr9nmsRPMhpv9 9EAD5oYd3qCN999S5UHQs75AWeienlZYB9DdFLcfdj9ykfA0Dab8LCPXzHgyrz0ghQzF cTP3ZWoK5UUzSwgdRB4zznTlnaXPBhNDxwi6fIxXstUGb1JTG3zUURCu0iMLDJnjrKri Dg3A==
X-Received: by 10.182.166.10 with SMTP id zc10mr12010313obb.80.1366732264719; Tue, 23 Apr 2013 08:51:04 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.60.3.137 with HTTP; Tue, 23 Apr 2013 08:50:44 -0700 (PDT)
In-Reply-To: <750CBB7A-3E82-4D2A-871E-159E9F030E6F@mnot.net>
References: <750CBB7A-3E82-4D2A-871E-159E9F030E6F@mnot.net>
From: James M Snell <jasnell@gmail.com>
Date: Tue, 23 Apr 2013 08:50:44 -0700
Message-ID: <CABP7Rbez0Rt3U_1mg2FDqS+XKM8VwhnCh=JmTJ-8aChprD8YVQ@mail.gmail.com>
To: Mark Nottingham <mnot@mnot.net>
Cc: "ietf-http-wg@w3.org Group" <ietf-http-wg@w3.org>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Received-SPF: pass client-ip=209.85.214.180; envelope-from=jasnell@gmail.com; helo=mail-ob0-f180.google.com
X-W3C-Hub-Spam-Status: No, score=-0.8
X-W3C-Hub-Spam-Report: 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 1UUfVC-0001rk-OA a61691a96f3c9761aa5a60e2050aeccd
X-Original-To: ietf-http-wg@w3.org
Subject: Re: p2: Expect: 100-continue and "final" status codes
Archived-At: <http://www.w3.org/mid/CABP7Rbez0Rt3U_1mg2FDqS+XKM8VwhnCh=JmTJ-8aChprD8YVQ@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/17506
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>

For 1.x, I would say just leave this alone as is. I doubt there's
anything we can do that'll bring the non-conforming implementations
into line and it's not a critical enough of an issue to deserve
pushing on too much.

For 2.x, We ought to update the definition of Expect so that, for any
request method, an 100-Continue expectation MUST result in either a
RST_STREAM (if unsatisfied) or a 100 (Continue) as you suggest.

That said, I would also prefer that we discourage any further
definition of new expectations that dictate specific status response
codes from the server. The server ought to be free to return any
status it determines to be appropriate, and we now have the Prefer
header for allowing the client to communicate it's preferences while
still leaving the decision in the servers hands.

- James

On Tue, Apr 23, 2013 at 12:22 AM, Mark Nottingham <mnot@mnot.net>; wrote:
> p2 5.1.1.1 explains the semantics of 100-continue: "If the origin server responds with a final status code, it must not have performed the request method and may either close the connection or continue to read and discard the rest of the request."
>
> In my (admittedly quick) testing, pretty much nobody does this, at least by default; i.e., if I send a GET to a server with Expect: 100-continue, it's going to give me a 200 or 30x, not a 417. Sure, they might send 417 for a request with a body, but as written pretty much no one is conformant.
>
> One thing we could do would be to only place requirements upon proxies and servers when Expect: 100-continue is on a request with a body.
>
> Stepping back, though, I have to wonder if it's reasonable to only allow 100 (Continue) or, effectively, an error (since the request can't be "applied") in the presence of Expect: 100-continue. I've seen many implementations that purposefully ignore Expect: 100-continue and send back 200 (OK) responses to avoid the interop problems that expect/continue brings.
>
> OTOH if we do maintain the notion that a final response to an Expect: 100-continue request needs to NOT be applied on the server, we should use more specific terminology (i.e., say that it needs to be a 4xx or 5xx response status, not just a "final response.").
>
> Thoughts?
>
> --
> Mark Nottingham   http://www.mnot.net/
>
>
>
>