Re: RFC 9113 and :authority header field

Martin Thomson <mt@lowentropy.net> Thu, 30 June 2022 00:51 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 28F6CC15AD45 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 29 Jun 2022 17:51:37 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.757
X-Spam-Level:
X-Spam-Status: No, score=-2.757 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.25, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=lowentropy.net header.b=Y7oJun63; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=dPbQuaRn
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hg3D_h1dGV2v for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 29 Jun 2022 17:51:32 -0700 (PDT)
Received: from lyra.w3.org (lyra.w3.org [128.30.52.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 93DE1C157B32 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 29 Jun 2022 17:51:32 -0700 (PDT)
Received: from lists by lyra.w3.org with local (Exim 4.94.2) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1o6iLZ-00G9aA-6l for ietf-http-wg-dist@listhub.w3.org; Thu, 30 Jun 2022 00:47:53 +0000
Resent-Date: Thu, 30 Jun 2022 00:47:53 +0000
Resent-Message-Id: <E1o6iLZ-00G9aA-6l@lyra.w3.org>
Received: from mimas.w3.org ([128.30.52.79]) by lyra.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <mt@lowentropy.net>) id 1o6iLY-00G9ZC-23 for ietf-http-wg@listhub.w3.org; Thu, 30 Jun 2022 00:47:51 +0000
Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by mimas.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <mt@lowentropy.net>) id 1o6iLW-007XfF-KU for ietf-http-wg@w3.org; Thu, 30 Jun 2022 00:47:51 +0000
Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 2AC9F5C048A for <ietf-http-wg@w3.org>; Wed, 29 Jun 2022 20:47:38 -0400 (EDT)
Received: from imap41 ([10.202.2.91]) by compute3.internal (MEProxy); Wed, 29 Jun 2022 20:47:38 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lowentropy.net; h=cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; t=1656550058; x=1656636458; bh=22ubAhPEx8 QyaFyuwsN4aeu5YorJ630u8FVKW5qfceE=; b=Y7oJun634khkhihKK6dD8TmWv1 Ih7fRr8hSqTiPEXhqCeJVeYAUz0x67HXE5vT9nP14INB7ZoVXi3TrTPTKeM1H9nP TE3FJCMJ5AZNtq0e0/wreFuuJW1gJP80OG9rf5SQ1F/XY7v2pNOCPzzD3aJgYIky C6mYKNBju//7oUywffrNmmhQMXWXgruarlKb5rULr+K8o/tH3zHq6Zk3FEtMMD67 WbveS9CT97PD4hUNHJFXy2ovn8EinVv27XI/ucMMUj28BHSj6FgcNvA2vt3J7nws mszcMV6X0KhNmFb/Wzzo2IMdeMXNVdXg6PZ+Fvd5rPAsemm3qwwJxXy4XAxg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1656550058; x=1656636458; bh=22ubAhPEx8QyaFyuwsN4aeu5YorJ 630u8FVKW5qfceE=; b=dPbQuaRnAyHbmDmplVYd1SsnY2IS9Eytsk4GYjn2h6xt vqg1L5wPNDY/+6m/HrkT5iJArwfS6j6/PXAJmmHrGyjhR6Cq6UorUiFsINyTIYwe ZxXGnpxDmnoeB+PMf+OuVXBiYmXt7v/+pRUariKPXZBkCAQTk9j9NiEoFF8duoYZ hTw7jPoU3v7ZRtw+U4aiRtDDH4mKV/AVP+gFFzCx2ymmcwgWbn/5eAeiwaK/Gtln nFlj9Mi/Vk3Kj1m/8nR8/mJvFQpXunD1QeNZnLgyFNMfulN3n4a4tyo7agl58Jv0 V/lc5K0CBeveXGI1QrTcDW2B5DUYi/gO6my8Ou7DLA==
X-ME-Sender: <xms:qfK8Yu2R-554EeqkxXJXsx5umWUBG7VoVrEhSamARPGN3HXvfn8WQQ> <xme:qfK8YhEsqgqpIG3zSX2ESlfbPe_LSZXZpJclduXlZ4PK2dIS1SUEhKN1VF3BTf9KX 64AtTuhZhn8vYashh4>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudehtddgfeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfgjfhffhffvufgtsehttd ertderredtnecuhfhrohhmpedfofgrrhhtihhnucfvhhhomhhsohhnfdcuoehmtheslhho figvnhhtrhhophihrdhnvghtqeenucggtffrrghtthgvrhhnpeekteeuieektdekleefke evhfekffevvdevgfekgfeluefgvdejjeegffeigedtjeenucevlhhushhtvghrufhiiigv pedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmtheslhhofigvnhhtrhhophihrdhnvg ht
X-ME-Proxy: <xmx:qfK8Ym5hGMNO1L59qPFFo5c1qjf4xR-Q8GP-OhEst0lj-EJKP2StTQ> <xmx:qfK8Yv27NXOqUkHl0dm2UWxFlw7Sx_8IE2nqWtDOGD7qEUbHw0K4WA> <xmx:qfK8YhEdRkTmm3e3_e7AUYABPiMsB9nIDz9FEHR8DLe2k5ggrRDhIA> <xmx:qvK8YlRtoZSNWiAELUej2Y9MhJChGDH0HsBNlbxaiLxKnsDp1P8EdQ>
Feedback-ID: ic129442d:Fastmail
Received: by mailuser.nyi.internal (Postfix, from userid 501) id CB4942340077; Wed, 29 Jun 2022 20:47:37 -0400 (EDT)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.7.0-alpha0-713-g1f035dc716-fm-20220617.001-g1f035dc7
Mime-Version: 1.0
Message-Id: <c9dc26af-5b25-4e0c-a260-988ca402350b@beta.fastmail.com>
In-Reply-To: <CAPDSy+41Cu8We=FTZr3PnMq+S1Vw75-YZo4LM3OLZEfnXCE5aQ@mail.gmail.com>
References: <CAPyZ6=+q+MoOOwoCxbtFjt+gqsjHBqTzz9KXNVcs3EP-4VFp=Q@mail.gmail.com> <D7142A8A-5B80-46F5-A653-2307EE2DC5D8@gbiv.com> <CAPyZ6=LCSDAsPoFCQ2cRO-i+dpo5vnp2L5A7ZLw8dvRtDs6HUg@mail.gmail.com> <20220629055254.GA18881@1wt.eu> <34B74169-9A07-4003-8F76-1B518DE3A3A0@gbiv.com> <CAPDSy+41Cu8We=FTZr3PnMq+S1Vw75-YZo4LM3OLZEfnXCE5aQ@mail.gmail.com>
Date: Thu, 30 Jun 2022 10:47:18 +1000
From: Martin Thomson <mt@lowentropy.net>
To: ietf-http-wg@w3.org
Content-Type: text/plain
Received-SPF: pass client-ip=66.111.4.29; envelope-from=mt@lowentropy.net; helo=out5-smtp.messagingengine.com
X-W3C-Hub-DKIM-Status: validation passed: (address=mt@lowentropy.net domain=lowentropy.net), signature is good
X-W3C-Hub-DKIM-Status: validation passed: (address=mt@lowentropy.net domain=messagingengine.com), signature is good
X-W3C-Hub-Spam-Status: No, score=-6.8
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, W3C_AA=-1, W3C_DB=-1, W3C_IRA=-1, W3C_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1o6iLW-007XfF-KU ff381848fd5689646f4af2630157468a
X-Original-To: ietf-http-wg@w3.org
Subject: Re: RFC 9113 and :authority header field
Archived-At: <https://www.w3.org/mid/c9dc26af-5b25-4e0c-a260-988ca402350b@beta.fastmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/40222
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>

On Thu, Jun 30, 2022, at 05:42, David Schinazi wrote:
> <<An intermediary that forwards a request over HTTP/2 MUST construct an 
> ":authority" pseudo-header field using the authority information from 
> the control data of the original request, unless the original request's 
> target URI does not contain authority information (in which case it MUST NOT generate ":authority").>>

Note the restoration of the final missing parenthetical.

> Am I misunderstanding something?

The distinction here is between requests that a client creates for itself and requests that it is forwarding.

The interpretation from Stefan is right: if you forward a request that only has Host and not :authority (perhaps because it came in HTTP/1.1) then you include "host" and not ":authority" in HTTP/2.

Consider also that not every HTTP/2 client conforms to RFC 9113; there are a number that conform to the language in RFC 7540.

(If your next point is that this could be clearer in the spec, I'm not going to disagree with you.)