Re: Optional Connection fields in 1xx messages and Upgrade requests

Willy Tarreau <w@1wt.eu> Thu, 15 October 2020 03:24 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 BAD2C3A1231 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 14 Oct 2020 20:24:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.65
X-Spam-Level:
X-Spam-Status: No, score=-2.65 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=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 owFNsR5BF1qk for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 14 Oct 2020 20:24:41 -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 4315A3A1230 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 14 Oct 2020 20:24:41 -0700 (PDT)
Received: from lists by lyra.w3.org with local (Exim 4.92) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1kStqE-00086n-1h for ietf-http-wg-dist@listhub.w3.org; Thu, 15 Oct 2020 03:22:10 +0000
Resent-Date: Thu, 15 Oct 2020 03:22:10 +0000
Resent-Message-Id: <E1kStqE-00086n-1h@lyra.w3.org>
Received: from mimas.w3.org ([128.30.52.79]) by lyra.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <w@1wt.eu>) id 1kStqB-000811-SB for ietf-http-wg@listhub.w3.org; Thu, 15 Oct 2020 03:22:07 +0000
Received: from wtarreau.pck.nerim.net ([62.212.114.60] helo=1wt.eu) by mimas.w3.org with esmtp (Exim 4.92) (envelope-from <w@1wt.eu>) id 1kStq9-0008N9-Mz for ietf-http-wg@w3.org; Thu, 15 Oct 2020 03:22:07 +0000
Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id 09F3LLb6013141; Thu, 15 Oct 2020 05:21:21 +0200
Date: Thu, 15 Oct 2020 05:21:21 +0200
From: Willy Tarreau <w@1wt.eu>
To: Alex Rousskov <rousskov@measurement-factory.com>
Cc: HTTP Working Group <ietf-http-wg@w3.org>, Amos Jeffries <squid3@treenet.co.nz>
Message-ID: <20201015032121.GD12967@1wt.eu>
References: <squid-cache/squid/pull/732@github.com> <squid-cache/squid/pull/732/c708672207@github.com> <b8d3cd2c-4f1a-ce4a-b9c5-f990c07ed8bd@measurement-factory.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <b8d3cd2c-4f1a-ce4a-b9c5-f990c07ed8bd@measurement-factory.com>
User-Agent: Mutt/1.6.1 (2016-04-27)
Received-SPF: pass client-ip=62.212.114.60; envelope-from=w@1wt.eu; helo=1wt.eu
X-W3C-Hub-Spam-Status: No, score=-7.9
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_IRA=-1, W3C_IRR=-3, W3C_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1kStq9-0008N9-Mz 83c9870f2aaef92a81dd0d3ae166bedb
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Optional Connection fields in 1xx messages and Upgrade requests
Archived-At: <https://www.w3.org/mid/20201015032121.GD12967@1wt.eu>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/38091
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>

Hi Alex,

On Wed, Oct 14, 2020 at 07:52:37PM -0400, Alex Rousskov wrote:
> It may be a good idea to emphasize that both the upgrade-seeking request
> and a 101 response may include additional Connection headers, especially
> Connection: keep-alive. The agent participating in the upgrade MUST
> support enough of HTTP to not be confused by additional Connection
> headers (at least). The HTTP Upgrade mechanism is an HTTP mechanism.

Sadly I'm not surprised. That reminds me the (painful) period of the
websocket design that some on this list certainly remember as well. There
was a strong demand from some implementers to only use byte matching on
the wire instead of parsing HTTP messages, presumably because HTTP was
considered as the annoying protocol to switch away from, and I can easily
imagine that initial code parts written this way have not much evolved.

For having seen some HTTP code deployed in small IoT devices with just
a few tens of kB of RAM and essentially relying on strstr() to spot
header+value couples, I would suggest that each time we're dealing with
protocol variations targetting these use cases, we must be very careful
about how our messages are consumed. It's not necessarily easy nor even
possible most of the time, but this needs to be anticipated to ease
location of the problem at least.

Cheers,
Willy