Re: RFC 9113 and :authority header field

David Schinazi <dschinazi.ietf@gmail.com> Thu, 30 June 2022 20:18 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 D5AABC15C13D for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 30 Jun 2022 13:18:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.76
X-Spam-Level:
X-Spam-Status: No, score=-2.76 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, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] 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 ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sj8Pf1zRr9w9 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 30 Jun 2022 13:18:52 -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 38282C15C13C for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 30 Jun 2022 13:18:51 -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 1o70ZS-001phu-70 for ietf-http-wg-dist@listhub.w3.org; Thu, 30 Jun 2022 20:15:26 +0000
Resent-Date: Thu, 30 Jun 2022 20:15:26 +0000
Resent-Message-Id: <E1o70ZS-001phu-70@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 <dschinazi.ietf@gmail.com>) id 1o70ZR-001pgw-Sh for ietf-http-wg@listhub.w3.org; Thu, 30 Jun 2022 20:15:25 +0000
Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by mimas.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from <dschinazi.ietf@gmail.com>) id 1o70ZQ-0083Hj-Lv for ietf-http-wg@w3.org; Thu, 30 Jun 2022 20:15:24 +0000
Received: by mail-pf1-x429.google.com with SMTP id a15so427739pfv.13 for <ietf-http-wg@w3.org>; Thu, 30 Jun 2022 13:15:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KuGeisHqz0Y7DEcbni277Ks3RUErr1FonvzKl9UHz8g=; b=oQJ9PubVdkm1Go7EHWNFaLHfA2IyOtI5kmHNesIL6R+s+RP5RiWKUMFbykLI9i4OsB irTEqR6SKPcBquUQJ3pVv03cSI1iw0WjjvQdthAsdRVgmYhryIWNDeb+8JJ+Zo9b5dBe ujdKihbVVqtR8HVLxgpWzrL0OI0KFIVWlxgBaPz6UxexyVGbsy2gFHgu1yCqZUA3B91x 14TFQ0fPeR/dCGUIe9XBY2iXuVDXIUGguxKCCPN6NMZ3wnpLlDgI1vH/9D2VqMKtbNxF RbYx6mG1Q6wy6C+c7G4UCFvTGE6pAXTRVQhV5Gc2XTkhvm9F9HTfHKbPXvUb9UOBoO8L rLUA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KuGeisHqz0Y7DEcbni277Ks3RUErr1FonvzKl9UHz8g=; b=IFlb3RV2i8EnqPh0Q3dZHKj+3f870YoihOHPYJkASGjpIAhU8/sbLGui8NBpozkIQS /GD8ITxv7rMYvQUYRHsQjrjxAupB/9Bp5JDZr9zyGNsrJXtsnXo0UK/e/d1QEw9wjtNp hfH1sxPp0XEPd6Cjw7UkCJg5fLBKh/r/Zbjz9wD+IZin/9o37Iz053+bC38yzcYc3goB /peCAe/y1BaPZFGpuHpxApO2jvyZvGCQ3kePRELYcN6ATZ0drix0tEsMDCou78kgWfSQ 88XeuaiSfV915/6yOz6a05Z8PF+at/zRIE/r67ru8GIRX03qyvki1tpXKX6l4zow4e05 rGkg==
X-Gm-Message-State: AJIora/V4WUknFB0I21AN1xdufUUqLGOQjWvhOe012mdIQcaQ6Q4lvdT EGHfBFqo9dhmw4F7+zjQX9NLWFRxhkJfQVZOhxUTsMM1
X-Google-Smtp-Source: AGRyM1u8f5YwVW+Gc0e6sFxtYb/ICCtZPWg7+uUQAvtEEdYBJHWPyoWDVzi+nDSwzIt9xaxvqfrAtn3/az55TQ8N/AI=
X-Received: by 2002:a65:6bd4:0:b0:405:2d64:532c with SMTP id e20-20020a656bd4000000b004052d64532cmr9234243pgw.179.1656620111815; Thu, 30 Jun 2022 13:15:11 -0700 (PDT)
MIME-Version: 1.0
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> <c9dc26af-5b25-4e0c-a260-988ca402350b@beta.fastmail.com>
In-Reply-To: <c9dc26af-5b25-4e0c-a260-988ca402350b@beta.fastmail.com>
From: David Schinazi <dschinazi.ietf@gmail.com>
Date: Thu, 30 Jun 2022 13:15:00 -0700
Message-ID: <CAPDSy+5VzsyqBM3r3cG3LdX=-aQ1wALQGDyUsfPqs_sB0npvYQ@mail.gmail.com>
To: Martin Thomson <mt@lowentropy.net>
Cc: HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="0000000000004aeab005e2afed65"
Received-SPF: pass client-ip=2607:f8b0:4864:20::429; envelope-from=dschinazi.ietf@gmail.com; helo=mail-pf1-x429.google.com
X-W3C-Hub-DKIM-Status: validation passed: (address=dschinazi.ietf@gmail.com domain=gmail.com), signature is good
X-W3C-Hub-Spam-Status: No, score=-6.1
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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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 1o70ZQ-0083Hj-Lv 30ab451ba93643cf26dfe0340ab6b421
X-Original-To: ietf-http-wg@w3.org
Subject: Re: RFC 9113 and :authority header field
Archived-At: <https://www.w3.org/mid/CAPDSy+5VzsyqBM3r3cG3LdX=-aQ1wALQGDyUsfPqs_sB0npvYQ@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/40231
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>

Ah I see, the detail I missed was that in HTTP/1.1 the Host header is not
part of control data when using relative URLs. Thanks for clarifying.
David

On Wed, Jun 29, 2022 at 5:52 PM Martin Thomson <mt@lowentropy.net> wrote:

> 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.)
>
>