RE: H2 vs responses which should not carry any payload

Eric Lawrence <Eric.Lawrence@microsoft.com> Fri, 30 October 2020 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 3AE683A0CB9 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 30 Oct 2020 01:12:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.648
X-Spam-Level:
X-Spam-Status: No, score=-2.648 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, MAILING_LIST_MULTI=-1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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 pylOJKppxZJv for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 30 Oct 2020 01:12:32 -0700 (PDT)
Received: from lyra.w3.org (lyra.w3.org [128.30.52.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E4D443A0AA3 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Fri, 30 Oct 2020 01:12:31 -0700 (PDT)
Received: from lists by lyra.w3.org with local (Exim 4.92) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1kYPTv-0000qJ-Tn for ietf-http-wg-dist@listhub.w3.org; Fri, 30 Oct 2020 08:09:55 +0000
Resent-Message-Id: <E1kYPTv-0000qJ-Tn@lyra.w3.org>
Received: from titan.w3.org ([128.30.52.76]) by lyra.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <ylafon@w3.org>) id 1kYPTu-0000oO-42 for ietf-http-wg@listhub.w3.org; Fri, 30 Oct 2020 08:09:54 +0000
Received: from raoul.w3.org ([128.30.52.128]) by titan.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <ylafon@w3.org>) id 1kYPTs-0002Hg-K1 for ietf-http-wg@w3.org; Fri, 30 Oct 2020 08:09:53 +0000
Received: from platy.fdn.fr ([80.67.176.7] helo=[192.168.1.129]) by raoul.w3.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <ylafon@w3.org>) id 1kYPTs-0006Rq-AJ for ietf-http-wg@w3.org; Fri, 30 Oct 2020 08:09:52 +0000
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\))
Content-Type: text/plain; charset="utf-8"
From: Eric Lawrence <Eric.Lawrence@microsoft.com>
In-Reply-To: <CACMu3tr6UiZg9xy7Cs5JtL2w12wd8VekhYo5UvuGuQob6OFaaA@mail.gmail.com>
Resent-From: Yves Lafon <ylafon@w3.org>
Date: Fri, 23 Oct 2020 14:58:32 +0000
Cc: HTTP Working Group <ietf-http-wg@w3.org>, Mike Bishop <mbishop@evequefou.be>
Content-Transfer-Encoding: quoted-printable
Resent-Date: Fri, 30 Oct 2020 09:09:49 +0100
Message-Id: <DM6PR00MB0682E8A1FD251214464ECD4DF71A1@DM6PR00MB0682.namprd00.prod.outlook.com>
Resent-To: ietf-http-wg@w3.org
References: <20201023045426.GB4941@1wt.eu> <CACMu3tpPRzCnkbuTvEO9Tn5LQp+T++v21mDXU8fbn4JQHSSmaQ@mail.gmail.com> <CACMu3tr6UiZg9xy7Cs5JtL2w12wd8VekhYo5UvuGuQob6OFaaA@mail.gmail.com>
X-Name-Md5: efe3dad792d606410c9cc49cedaffc94
To: Bence Béky <bnc@chromium.org>, Willy Tarreau <w@1wt.eu>
X-Mailer: Apple Mail (2.3608.120.23.2.4)
X-W3C-Hub-Spam-Status: No, score=-4.7
X-W3C-Hub-Spam-Report: ALL_TRUSTED=-1, BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, W3C_IRA=-1, W3C_WL=-1
X-W3C-Scan-Sig: titan.w3.org 1kYPTs-0002Hg-K1 e3a0ae5210c19ea895e3e9e497e11efc
X-Original-To: ietf-http-wg@w3.org
Subject: RE: H2 vs responses which should not carry any payload
Archived-At: <https://www.w3.org/mid/DM6PR00MB0682E8A1FD251214464ECD4DF71A1@DM6PR00MB0682.namprd00.prod.outlook.com>
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/38134
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: <https://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

The term "client-only stack" is potentially ambiguous. WinHTTP can and is sometimes used as a HTTP client running on servers.

In the case in question (broken Microsoft's web properties in spring), the problem was is that the http.sys HTTP Server code on our "Azure front door" servers would accept the client's H2 request, see the header block did not set the END_STREAM flag indicating that there was no body, and convert that request to a GET with a Transfer-Encoding: chunked. That request was then handed off to WinHTTP for forwarding to the backend servers, but WinHTTP would reject the request because it does not permit Transfer-Encoding to appear on GET or HEAD requests. 

The June "fix" was to have our "front door" servers simply skip adding the TE:Chunked to inbound GETs even if the H2 headers did not indicate there would be no body, allowing WinHTTP to forward the request without breaking.

WinHTTP continues to disallow TE:Chunked on GET/HEAD, and we believe that an issue very similar to the one described previously will also occur for servers running the IIS ARR load balancer software.

-Eric

-----Original Message-----
From: Bence Béky <bnc@chromium.org> 
Sent: Friday, October 23, 2020 9:42 AM
To: Willy Tarreau <w@1wt.eu>
Cc: HTTP Working Group <ietf-http-wg@w3.org>; Mike Bishop <mbishop@evequefou.be>; Eric Lawrence <Eric.Lawrence@microsoft.com>
Subject: Re: H2 vs responses which should not carry any payload

Hi Willy,

Sorry, my previous e-mail was incorrect.  Chrome did run into some issues with buggy servers, and a fix to those servers has been deployed since.  Separately, the same bug is thought to exist in WinHTTP.  However, WinHTTP is a client-only stack, so this should only affect responses, not requests.  Which is exactly what you are worried about.

Thanks to Mike Bishop for correcting me in private.

Also cc'ing Eric Lawrence who might have more details to share.

Bence

On Fri, Oct 23, 2020 at 7:45 AM Bence Béky <bnc@chromium.org> wrote:
> 
> Hi Willy,
> 
> On Fri, Oct 23, 2020 at 12:57 AM Willy Tarreau <w@1wt.eu> wrote:
>> 
>> 
>> And even then, do all implementations accept, say, a HEADERS frame 
>> with no ES flag in response to a HEAD request, followed by an empty 
>> DATA frame carrying the ES flag ? At the semantic level it's OK 
>> since there's no payload, but I can understand how some could find 
>> it annoying to wait for DATA frames when no payload is expected 
>> (it's our case as well as part of the possible fixes for this).
>> 
>> 
> 
> At some point during the GREASE experiments Chrome removed the 
> END_STREAM flag from every HEADERS frame, then sent a frame of 
> reserved type, then an empty DATA frame with END_STREAM, and I found 
> that not every server accepts this.  To my best knowledge WinHTTP 
> still fails to process such a request (ever without the reserved
> frame) if the request method is GET.  My interpretation of RFC7540 is 
> that such a request is spec compliant, but in practice Chrome cannot 
> send them at this point.  (The GREASE experiment continues only on 
> requests with a request body.)
> 
> Bence