Re: 103 (Early Hints) vs. response headers

Stefan Eissing <stefan.eissing@greenbytes.de> Thu, 30 March 2017 08:12 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@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 B4AB212922E for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 30 Mar 2017 01:12:48 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.002
X-Spam-Level:
X-Spam-Status: No, score=-7.002 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=greenbytes.de header.b=lZdZO3V5; dkim=pass (1024-bit key) header.d=greenbytes.de header.b=lb4b05Yd
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 k8IHwkL9StBa for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 30 Mar 2017 01:12:46 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 58EFF128B4E for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 30 Mar 2017 01:12:45 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1ctV9E-0002PR-1y for ietf-http-wg-dist@listhub.w3.org; Thu, 30 Mar 2017 08:09:36 +0000
Resent-Date: Thu, 30 Mar 2017 08:09:36 +0000
Resent-Message-Id: <E1ctV9E-0002PR-1y@frink.w3.org>
Received: from mimas.w3.org ([128.30.52.79]) by frink.w3.org with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <stefan.eissing@greenbytes.de>) id 1ctV95-0002Oe-NQ for ietf-http-wg@listhub.w3.org; Thu, 30 Mar 2017 08:09:27 +0000
Received: from mail.greenbytes.de ([5.10.171.186]) by mimas.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <stefan.eissing@greenbytes.de>) id 1ctV8y-0006J1-Ln for ietf-http-wg@w3.org; Thu, 30 Mar 2017 08:09:22 +0000
Received: by mail.greenbytes.de (Postfix, from userid 117) id 6EB8515A39A7; Thu, 30 Mar 2017 10:08:52 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=greenbytes.de; s=mail; t=1490861332; bh=dbFQV8VGK0cAgcUySRE67OyZDRYbRW2OGsgMSGSe68Q=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=lZdZO3V5i3R16GDKem9NwAf6y2C0O5NYcWUjYG7/pwjX/kyBl9sg4/z/SA92MOY3I A89JHGcxQrxllVul6VlAzDOzSQK9zNguH5lXyqX7KN3gk+EOy0nQQz4BFqueObBisN mTg642nwM9dXjqHL7gBWs9FFUkaZED8YiGbexiO8=
Received: from delight.greenbytes.local (unknown [192.168.1.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail.greenbytes.de (Postfix) with ESMTPSA id 30F4515A2FE0; Thu, 30 Mar 2017 10:08:51 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=greenbytes.de; s=mail; t=1490861331; bh=dbFQV8VGK0cAgcUySRE67OyZDRYbRW2OGsgMSGSe68Q=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=lb4b05YdKcbFGT7N4qF69HlodYk5MC7+saRV5KXur9i6ZVzrmHqsvZlD7XNroTSXf WGtYNFkLM+7YpnHUs+vpGI9P+CyDmHS0inEgQIHXIjgSuE2oF+Kc1TibII3EL5qwzS ud/F5mXuiOnVg5VS1ks2W58i91v4dYI/RNaEa4KU=
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\))
From: Stefan Eissing <stefan.eissing@greenbytes.de>
In-Reply-To: <CANatvzx7ct=5csAn3kWAFgc9UbHrbtk7z+uZWKLJWj4YtJSh0Q@mail.gmail.com>
Date: Thu, 30 Mar 2017 10:08:53 +0200
Cc: Willy Tarreau <w@1wt.eu>, Mark Nottingham <mnot@mnot.net>, Vasiliy Faronov <vfaronov@gmail.com>, HTTP Working Group <ietf-http-wg@w3.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <7B4FC648-E621-42A7-92F2-7462E34346E4@greenbytes.de>
References: <CALHHdhwQBfBN0Xz-4kxRJrJekiCLnro1i-MVw954wTRyOWAtvw@mail.gmail.com> <E10BB6E0-3BD8-44EC-AE18-076D38077371@mnot.net> <CANatvzxS7Z9U5Jr2N_EeyY5NUrZ-weuGsetuUQdLWGGOQKVLNw@mail.gmail.com> <20170315062242.GB13814@1wt.eu> <CANatvzyeYxHFDDh-Hms6V0gJ+MkgW6v78uLj9bieR_nAaOfPHw@mail.gmail.com> <20170316143158.GB15641@1wt.eu> <CANatvzxoqDhDh0KgG3Jw29GQdrvL6GQjXPJUYiDiKJ-hPNt2GQ@mail.gmail.com> <CANatvzx7ct=5csAn3kWAFgc9UbHrbtk7z+uZWKLJWj4YtJSh0Q@mail.gmail.com>
To: Kazuho Oku <kazuhooku@gmail.com>
X-Mailer: Apple Mail (2.3273)
Received-SPF: pass client-ip=5.10.171.186; envelope-from=stefan.eissing@greenbytes.de; helo=mail.greenbytes.de
X-W3C-Hub-Spam-Status: No, score=-4.7
X-W3C-Hub-Spam-Report: AWL=-0.734, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1ctV8y-0006J1-Ln 0a04610f492f9515529e6371314a1071
X-Original-To: ietf-http-wg@w3.org
Subject: Re: 103 (Early Hints) vs. response headers
Archived-At: <http://www.w3.org/mid/7B4FC648-E621-42A7-92F2-7462E34346E4@greenbytes.de>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/33792
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>

> Am 29.03.2017 um 22:27 schrieb Kazuho Oku <kazuhooku@gmail.com>:
> 
> Hi!
> 
> 2017-03-16 10:10 GMT-05:00 Kazuho Oku <kazuhooku@gmail.com>:
>> Therefore, my preference goes to explicitly stating that the headers
>> of a 103 response must not be applied as part of the informational
>> response, and if there's a need in practice to make such distinction,
>> introduce negotiation to Early Hints.
> 
> I have uploaded -01[1]. The only change from -00 is that it now
> explicitly forbids processing the headers of an 103 response as part
> of the informational response.
> 
> I believe that we have not reached a consensus, but I hope that having
> the draft standing on one side would accelerate the debate.

+1

> 
> [1] https://datatracker.ietf.org/doc/draft-ietf-httpbis-early-hints/?include_text=1
> 
>> 2017-03-16 23:31 GMT+09:00 Willy Tarreau <w@1wt.eu>:
>>> Hi Kazuho,
>>> 
>>> On Thu, Mar 16, 2017 at 10:55:31PM +0900, Kazuho Oku wrote:
>>>>>> So to me it seems that if we state in Early Hints that the headers of
>>>>>> a 103 response is ones that are applied (speculatively) to the final
>>>>>> response but not the informational response itself, then we'd be
>>>>>> overriding RFC 6265.
>>>>> 
>>>>> I'm not seeing it this way. In fact you may decide to put some headers
>>>>> there for this exact reason : while 1xx MAY be ignored, those implementing
>>>>> 103 MAY/WILL consider them. And you're sending 103 hoping that someone
>>>>> will make good use of it, not as a guarantee, so I don't think it
>>>>> contradicts 6265.
>>>> 
>>>> While I would not say that RFC 6265 and Early Hints would contradict,
>>>> I still think that the requirement of how a Set-Cookie header _can_ be
>>>> handled is narrowed by Early Hints. Consider the response below.
>>>> 
>>>> HTTP/1.1 103 Early Hints
>>>> Set-Cookie: a=b
>>>> 
>>>> HTTP/1.1 200 OK
>>>> Content-Type: text/plain; charset=utf-8
>>>> Content-Length: 12
>>>> 
>>>> Hello world
>>>> 
>>>> RFC 6265 allows the client to store cookie `a` by stating that a
>>>> client MAY accept a Set-Cookie header within any 100-level response.
>>>> 
>>>> If we are to state in Early Hints that the headers of a 103 response
>>>> are to be applied (speculatively) to the final response but not to the
>>>> informational response itself, we would effectively be forbidding such
>>>> behavior for clients that implements 103.
>>>> 
>>>> In other words, a client that _do_ recognize a Set-Cookie header in
>>>> 100-level responses (it is a MAY in RFC 7230 section 6.2) would need
>>>> to special-case the handling of 103. From server-side perspective, it
>>>> would continue to be unable to expect whether if the client would
>>>> accept or ignore the set-cookie header in a 103 response since there
>>>> is no negotiation for Early Hints.
>>>> 
>>>> To me this seems like a variation of what was pointed out by Vasiliy
>>>> (by using the Warnings header).
>>> 
>>> Hmmm I see, indeed you can end up in an unknown state there. But maybe
>>> once properly documented it can be turned to a benefit for improved
>>> deployment. Let's consider this for example :
>>> 
>>> HTTP/1.1 103 Early Hints
>>> Set-Cookie: cookie_support_on_103=yes
>>> 
>>> HTTP/1.1 200 OK
>>> Content-Type: text/plain; charset=utf-8
>>> Set-Cookie: this_is_a_regular=application_cookie
>>> Content-Length: 12
>>> 
>>> Hello world
>>> 
>>> The server can detect in a subsequent request whether or not the path is
>>> clean. And by registering a standard cookie name for this use case we
>>> could even end up with the first request sending the information regarding
>>> this support from the browser based on the learning from a previous call
>>> without ever conflicting with application cookies, meaning that on subsequent
>>> calls the server may decide to pass much more info on the 103 response. Of
>>> course the cookie name and value would have to be much shorter than in the
>>> example above :-)
>>> 
>>> Willy
>> 
>> 
>> 
>> --
>> Kazuho Oku
> 
> 
> 
> -- 
> Kazuho Oku
>