Re: New Version Notification for draft-kazuho-early-hints-status-code-00.txt

Kazuho Oku <kazuhooku@gmail.com> Tue, 01 November 2016 01:38 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 0261B129B20 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 31 Oct 2016 18:38:00 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.998
X-Spam-Level:
X-Spam-Status: No, score=-7.998 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, RCVD_IN_SORBS_SPAM=0.5, RP_MATCHES_RCVD=-1.497, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 U5XKyMy0jf2E for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 31 Oct 2016 18:37:57 -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 96B1F129AAA for <httpbisa-archive-bis2Juki@lists.ietf.org>; Mon, 31 Oct 2016 18:37:57 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1c1NxK-0004Ld-Hl for ietf-http-wg-dist@listhub.w3.org; Tue, 01 Nov 2016 01:33:38 +0000
Resent-Date: Tue, 01 Nov 2016 01:33:38 +0000
Resent-Message-Id: <E1c1NxK-0004Ld-Hl@frink.w3.org>
Received: from titan.w3.org ([128.30.52.76]) by frink.w3.org with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <kazuhooku@gmail.com>) id 1c1NxF-0004Ke-5N for ietf-http-wg@listhub.w3.org; Tue, 01 Nov 2016 01:33:33 +0000
Received: from mail-wm0-f52.google.com ([74.125.82.52]) by titan.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <kazuhooku@gmail.com>) id 1c1Nx9-0001Uv-2Q for ietf-http-wg@w3.org; Tue, 01 Nov 2016 01:33:27 +0000
Received: by mail-wm0-f52.google.com with SMTP id a197so52343345wmd.0 for <ietf-http-wg@w3.org>; Mon, 31 Oct 2016 18:33:06 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=HBzvfURO/O4q+MjH5qoY0pCgnclMgqXRo19pyghX6Bw=; b=hRk0YU+SLoOJi1uuoFE0YZss9njXM8kBufadksNVkSuhseOkUDsdWuzvkNEQIGCtRt ylij31zNDZCRawk5albx3Y9i4ZN7UTIMyQh1jCnSkyTO8qoHFL8Ijy+fXzpPZ5ufhDBJ XxlsUV6F3BdPEtPUeeej0GeVeXHei4nw1zHrHuJ+doZMsXdzrgUnYJC8wBLVyF8IPH8Z QHTr0GLl9VQP6gYkiXnrMPnISbBPuXR2r9LG9e/Jc8bjuRA1lc2jDIDXR4Rl9aHC7Blu 77PsFtgnDbUmNCzsg9qfEwDAHpoeB6TOw3k8iLsVdsmaGUVAvexFdGKhVPRVA5cEusHs mAQg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=HBzvfURO/O4q+MjH5qoY0pCgnclMgqXRo19pyghX6Bw=; b=JI2JuTJ1QpKxw7JNvW46bjQK2Na05pom6rNP66fTAfCv16IZQt6qdCYN/hy9QGQ1Iz hqHP0mvsXNDxXpOSwWvgHoWliAtEW4cY762EGfqoYeYZf4RdB/Q8HiJhng+BrqvFUViD Nl8Dif2uIUyYEGrIQRrLVoLcpTIuYAcHhtqYoHpfGnU0w0aRnd/OcEDV/L+vhm6kthPK EDf4uvQzwHH9p3q2yvpjjm9vSrsY7MCl+KzzmbWHbksiGwaYWXMTPTea6PV0g4TiLivg UZYLBsuopVRWunTZgDiCEYtCruqnutYk5qCjxfQrKjL6XmRSC7vVOw+4m582ZSmYC7c4 Q4vg==
X-Gm-Message-State: ABUngvdvh8Qu03Nl/doQ1yleKh3cFfRFW9Do42wViV/D+Luus2gWBD1Vboq4nJBAgRhx2jUDNTX6wdUutaSzSw==
X-Received: by 10.194.172.42 with SMTP id az10mr7729205wjc.145.1477963979817; Mon, 31 Oct 2016 18:32:59 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.194.163.69 with HTTP; Mon, 31 Oct 2016 18:32:58 -0700 (PDT)
In-Reply-To: <86447165-100C-407D-8512-A32F93B11BBA@lukasa.co.uk>
References: <147792294052.32397.15544665152412530374.idtracker@ietfa.amsl.com> <CANatvzwm_T-HW0yT1MAWEUrfw5OAVkmAZe890575qg8HuU9Z_Q@mail.gmail.com> <86447165-100C-407D-8512-A32F93B11BBA@lukasa.co.uk>
From: Kazuho Oku <kazuhooku@gmail.com>
Date: Tue, 01 Nov 2016 10:32:58 +0900
Message-ID: <CANatvzzRvbEjy4AqDHeRtQfcJX0Ls14qJf0qv0QWZBMMd-HRnQ@mail.gmail.com>
To: Cory Benfield <cory@lukasa.co.uk>, "Julian F. Reschke" <julian.reschke@gmx.de>
Cc: HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Received-SPF: pass client-ip=74.125.82.52; envelope-from=kazuhooku@gmail.com; helo=mail-wm0-f52.google.com
X-W3C-Hub-Spam-Status: No, score=-4.9
X-W3C-Hub-Spam-Report: AWL=-1.373, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: titan.w3.org 1c1Nx9-0001Uv-2Q c71a20a16ee188290bb4499656f28d9f
X-Original-To: ietf-http-wg@w3.org
Subject: Re: New Version Notification for draft-kazuho-early-hints-status-code-00.txt
Archived-At: <http://www.w3.org/mid/CANatvzzRvbEjy4AqDHeRtQfcJX0Ls14qJf0qv0QWZBMMd-HRnQ@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/32774
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>

2016-11-01 3:21 GMT+09:00 Cory Benfield <cory@lukasa.co.uk>:
>
>> On 31 Oct 2016, at 14:25, Kazuho Oku <kazuhooku@gmail.com> wrote:
>>
>> The draft proposes a new _informational_ status code that can be used
>> for indicating hints to help a client start making preparations for
>> processing the final response, while the server struggles to build the
>> final response.
>>
>> Actually, we already have a working implementation. H2O, our HTTP/2
>> server, recognizes Link: rel=preload headers within an informational
>> response sent from upstream, and tries to push the specified resource.
>> One reason I decided to write this draft is because I believe it would
>> be better to standardize the mechanism.
>
> Kazuho,
>
> This draft generally seems like a really good idea. It helps to resolve some of the substantial issues around the processing of large or high-latency responses, and as you have identified seems like it would make a good companion to HTTP/2 server push. I think this is a draft worth pursuing, and though I will not be at the next IETF meeting I look forward to seeing the progress through the IETF.
>
> While I’m here, I’d like to discuss section 3. To provide some data points, most of the HTTP/1.1 clients in the Python ecosystem will not handle a new 1XX status code very well. A quick survey of the ecosystem suggests that the following tools will all misbehave:
>
> - every standard library http client (urllib, urllib2, httplib), all of which treat only “100 Continue” specially: the rest will treat the 103 header block as the final response and, because it MUST NOT have a content-length, will read until connection close.
> - every third-party library built on top of those tools, including urllib3, Requests, and httplib2, which inherit their misbehaviour.
> - aiohttp, which special-cases 100 and 101 but not any others
> - Twisted’s client, which special-cases 100
>
> In fact, so far I haven’t found a single Python http client that would handle this response in any way that approaches sensible. I would even tolerating *ignoring* the response as a sensible behaviour, but we don’t even have that. In all cases, these clients treat the 103 response as the final response and totally lose track of their framing.
>
> I doubt Python is unique here. While other languages may have libraries that are somewhat better at handling this situation, certainly some-to-many of them will continue to have this problem. This problem is also likely to be present throughout the long-tail of HTTP implementations: clearly it has been received wisdom by implementers that non-100 1XX status codes do not need to be supported because they will not be encountered. Worse, many of these implementations may be unable to update. Even if Python’s standard library http.client library was fixed to handle 1XX codes sensibly, the most widely-deployed version of Python (2.7) would not receive any such fix, meaning that all Python 2.7 users would be utterly confused by the receipt of a 103 status code.
>
> This means that your suggestion that this should be negotiated is extremely important. I think it’s not “desirable” to negotiate this behaviour: I think it’ll have to be mandatory if we want to avoid screwing up a majority of long-tail HTTP/1.1 clients in the world. For HTTP/1.1, that’ll have to be negotiation by header, presumably by means of either an extension to the “Expect” header field or an equivalent header field that is inserted by analogy. For HTTP/2 this could be negotiated at the connection level by means of a settings value, or by the same header at the cost of one byte per request.

Cory, Julian, thank you for looking into the I-D.

Thank you for looking into the existing implementations using Python.
Your research makes it evident that some kind of negotiation is
mandatory if we are going to use 103 on the public Internet.

For the purpose, defining an Accept-EH header (much like Accept-CH)
might make sense. For example, a client can send `Accept-EH: Link` to
indicate that it will recognize link headers within the Early Hints.

For HTTP/2, my tendency leans toward using HTTP headers rather than
having its own way of negotiation, considering the fact that the
information transferred using Early Hints could be considered
end-to-end rather than hop-by-hop, and also that we can expect HPACK
to compress Accept-EH header efficiently.

>
> I’ll start filing bugs against relevant repositories to address this behaviour so that the Python ecosystem is less embarrassingly unprepared for further 1XX status codes, but in the short-to-medium term it would be much better if we could negotiate the 103 status code rather than assume it will function correctly.

Fantastic! Thank you for all your efforts.

>
> Cory



-- 
Kazuho Oku