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

Julian Reschke <julian.reschke@gmx.de> Tue, 08 November 2016 14:28 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 18126129541 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 8 Nov 2016 06:28:11 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.898
X-Spam-Level:
X-Spam-Status: No, score=-7.898 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, 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
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 bQuB-QA8_ege for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 8 Nov 2016 06:28:09 -0800 (PST)
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 B7814129441 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Tue, 8 Nov 2016 06:28:09 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1c47Hs-0005TS-FG for ietf-http-wg-dist@listhub.w3.org; Tue, 08 Nov 2016 14:22:08 +0000
Resent-Date: Tue, 08 Nov 2016 14:22:08 +0000
Resent-Message-Id: <E1c47Hs-0005TS-FG@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 <julian.reschke@gmx.de>) id 1c47Hj-0005SH-3a for ietf-http-wg@listhub.w3.org; Tue, 08 Nov 2016 14:21:59 +0000
Received: from mout.gmx.net ([212.227.17.22]) by mimas.w3.org with esmtps (TLS1.2:DHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <julian.reschke@gmx.de>) id 1c47Hc-0006Fd-RK for ietf-http-wg@w3.org; Tue, 08 Nov 2016 14:21:53 +0000
Received: from [192.168.1.123] ([5.10.171.186]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0MEsXW-1c2TNZ0Drm-00G3Tn; Tue, 08 Nov 2016 15:21:23 +0100
To: Cory Benfield <cory@lukasa.co.uk>, Kazuho Oku <kazuhooku@gmail.com>
References: <147792294052.32397.15544665152412530374.idtracker@ietfa.amsl.com> <CANatvzwm_T-HW0yT1MAWEUrfw5OAVkmAZe890575qg8HuU9Z_Q@mail.gmail.com> <86447165-100C-407D-8512-A32F93B11BBA@lukasa.co.uk>
Cc: HTTP Working Group <ietf-http-wg@w3.org>
From: Julian Reschke <julian.reschke@gmx.de>
Message-ID: <c7b33b3d-8cab-5621-2c74-14e21a5a3885@gmx.de>
Date: Tue, 8 Nov 2016 15:21:22 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0
MIME-Version: 1.0
In-Reply-To: <86447165-100C-407D-8512-A32F93B11BBA@lukasa.co.uk>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Provags-ID: V03:K0:VdJ6S3ygINC/I8viXaVW588zQGoyJXnG9ULCc61a7vJgnvBgbbT 2ac4I4Gsn4ioePZ3Z0nuEirst/kySSO4AYaXf74kT+mF6Mx7YRm7HgJK5qMZeOjw4lg5/7V 5nDbuw3lqbh3adneXKHhIWE1uDIjyt4Xp/corNRaoXnm4XSGK6n+Uk5XOvzlN0dHfqjNsNM d1Z+r6Si9Sq/LY/yviaHQ==
X-UI-Out-Filterresults: notjunk:1;V01:K0:r8+vCbTveq4=:1qRw4dyVe3+JVDq0wiAkfY cLkBY3TyZf4kGXHItmRCt43DGMHR0Q+tdvfCuHp0d/TvaGt12pZmeXSqK6Sl4LZ8CNl+46Kbh +HiIcAmURzryRswoO6+TEgN4+3ef8HQf7NuBDN6/1F5aYXMwZIWZDiKSKoS+oSctWf6+faukD gRGPU+egyiIGqjqqXZnN6vZomXMssvbMyJVpG9JhhUU3fowL+a+84vvGXiZgMNY1SAL3rKCiy pcXUavatfpqvpWf/5FExF6n98Mj8SsBkB6jbuWnDZ/LRlnhOXwSrjeD5UglT40cXXyRjkdc0K 74vdtHFSIRYh/1QxQONqS/7/6Rh7QCfTh75ncTuSSwFZ2RSKE4FDFfJQ/tLNWDmZnMg77OydE sSKqye7WWhBqqXWY9KOcBIRD4t8D9rSDAh9f3ZYoISTTLW2W40S04DXjUcc6J3iNeo3lY5HvY c080PPoG/gWxvX7+bW6rlFy3+v/O4MenLuQ2PYVh4BatX/gOaaVog6jL6SGXIPzyubhUyS3QN pXDUfXewIQiKBKPKNy30XU/amZTRTepFmk6uc6DFcruzvVK8JVAwlNlNQQwiU0sroo9YAGXx+ JVDuGs/vZpfSfEu24xOSvOyMGhTw84qG702qYDjL1H2ej06SLfMnd3MaWPw8LMgDgxoEWh+Mz CRBpaHxwtZH5jv4L7aAfDmAPvqb0px7hB0u1nN68Zga7j4A19QxWPq9tZ/9bz22YEdlJ3oCfI Ko8LBewrzvCoM3zl7PLvjePhhJqk5qbMqhTvZSFNiM40059Lfb3tgpdZWyCkFhNAeepjJacIw eldzCtJ
Received-SPF: pass client-ip=212.227.17.22; envelope-from=julian.reschke@gmx.de; helo=mout.gmx.net
X-W3C-Hub-Spam-Status: No, score=-8.1
X-W3C-Hub-Spam-Report: AWL=1.171, BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-2.638, SPF_PASS=-0.001, W3C_AA=-1, W3C_DB=-1, W3C_IRA=-1, W3C_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1c47Hc-0006Fd-RK cb59a67c5ba7f3a2421414aa5f79e22c
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/c7b33b3d-8cab-5621-2c74-14e21a5a3885@gmx.de>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/32856
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 2016-10-31 19:21, Cory Benfield wrote:
> ...
> 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
> ...

FWIW,

I just did a small Java test with a) JDK's URLConnection and b) Apache 
HTTP client 4.5.x.

a) Works in that it returns the correct response, but only after waiting 
for a timeout to occur it seems (needs to be investigated)

b) Works properly.

Neither API exposes the intermediate status, but at least for b) it 
looks like a relatively simple change.

-- snip --
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;

import org.apache.http.HttpException;
import org.apache.http.HttpResponse;
import org.apache.http.HttpResponseInterceptor;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.protocol.HttpContext;
import org.apache.http.util.EntityUtils;

public class Test103 {

     public static void main(String[] args) throws IOException {
         apache();
         java();
     }

     private static void apache() throws IOException {
         HttpClient c = HttpClientBuilder.create().build();
         HttpGet get = new HttpGet("https://nghttp2.org/?103-eh");
         HttpResponse resp = c.execute(get);
         System.out.println(resp.getStatusLine());
         System.out.println(EntityUtils.toString(resp.getEntity()));
     }

     private static void java() throws IOException {
         URL test = new URL("https://nghttp2.org/?103-eh")-eh");
         InputStream is = test.openConnection().getInputStream();
         byte[] bytes = readFully(is);
         System.out.println(new String(bytes));
     }

     public static byte[] readFully(InputStream is) throws IOException {
         ByteArrayOutputStream buffer = new ByteArrayOutputStream();
         int nRead;
         byte[] data = new byte[16384];

         while ((nRead = is.read(data, 0, data.length)) != -1) {
             buffer.write(data, 0, nRead);
         }

         buffer.flush();

         return buffer.toByteArray();
     }
}
-- snip --

Best regards, Julian