Re: RFC 9113 and :authority header field

Kazuho Oku <kazuhooku@gmail.com> Mon, 04 July 2022 01:10 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 1E12DC14F6E5 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 3 Jul 2022 18:10:36 -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, 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, 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=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 wr8qdmpuDhps for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 3 Jul 2022 18:10:31 -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 EBCCCC14F728 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Sun, 3 Jul 2022 18:10:30 -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 1o8AYX-00A7bG-1e for ietf-http-wg-dist@listhub.w3.org; Mon, 04 Jul 2022 01:07:17 +0000
Resent-Date: Mon, 04 Jul 2022 01:07:17 +0000
Resent-Message-Id: <E1o8AYX-00A7bG-1e@lyra.w3.org>
Received: from titan.w3.org ([128.30.52.76]) by lyra.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <kazuhooku@gmail.com>) id 1o8AYW-00A7aJ-6k for ietf-http-wg@listhub.w3.org; Mon, 04 Jul 2022 01:07:16 +0000
Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by titan.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from <kazuhooku@gmail.com>) id 1o8AYU-0096T3-KE for ietf-http-wg@w3.org; Mon, 04 Jul 2022 01:07:15 +0000
Received: by mail-ej1-x62b.google.com with SMTP id pk21so14149078ejb.2 for <ietf-http-wg@w3.org>; Sun, 03 Jul 2022 18:07:14 -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=OOft9fBaAV0X+tS3t7Nfhv6O9EblMRd3G1AXf5z25qM=; b=PFKeTxL2Elhq4GErDd3M87D8hqmt4x6UCD/pDlgX3+xKkMBrEE6efFDDJEnR5jobgX qpIbAmn8GpynqHL49OkdjETjahI4yVYfXQHZR5+oTlWf1BO7v9SMVLzPiD6l9sv+YsL7 fwMjV4zfvPAJ2ilKNgGFB6M2zT5uBWpO33q9Twlkt7FYauOdfCzl42m8of+oEsvnbuk9 5cmNgze/BfhOdyUX3LfIq56MKfA67wB7KXtDJ0DExK+YwmkpqavLTRZp2CRy4HN0ad5I BD7NfR3o3JYbZ767yeOjkzxi2zIP+iO9+mAzq8eKPP8soQt3m4WcsiRT6WNOpUroCvq0 2pMg==
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=OOft9fBaAV0X+tS3t7Nfhv6O9EblMRd3G1AXf5z25qM=; b=Aag8znfq9QWBM3y08Ik2t/hIWQW1w9QT1WbVZYc0aeZ0ZP9ZEOFIj1FyeLjZwesCfc /nDqfsC3q0CtnKzprH9f38/AyLGBs6uVypsRqBM+T3Mu0GoGhRoW7ipeOaIitv1AUyKG iYBHoRlWPlsDdUNbWRik7uLXIRFA87X+aaEfuG3Mzk5/+2ZA/mwCpGWgGCAr+AGCp5UF 9tT7S1r+yi1zFIWpfzOCeT4Qsc8dIo61HL5XW2uOxhhgKFmSGizdHDozK6dsOXmCas/m VZaFbwO0Rs7ujpoLMXoxgLPDQua+mHPmQaJeOtpZAznnsta0dbxWQb+nCBNXIW66SOsR i9Dw==
X-Gm-Message-State: AJIora8W202v0FJz16RcXMrM0SzaIxwplHqQfEkINYfEzONjneJMxoRb iccZghVQcYyovitdrwVn0jUm7fJF1VoUcNYMg7w=
X-Google-Smtp-Source: AGRyM1t1CblWp36W4FnagxNjBS14lib6ttXgQZFZnuBa0SqYG8lbzti1mXicDu/smBJFCc8BSrZpdEjf+9aJJoBX8jk=
X-Received: by 2002:a17:906:37c6:b0:70c:f9f:f0c5 with SMTP id o6-20020a17090637c600b0070c0f9ff0c5mr26179399ejc.743.1656896821569; Sun, 03 Jul 2022 18:07:01 -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> <741f3592-4d20-45fc-9658-8c4c71f08e5b@beta.fastmail.com>
In-Reply-To: <741f3592-4d20-45fc-9658-8c4c71f08e5b@beta.fastmail.com>
From: Kazuho Oku <kazuhooku@gmail.com>
Date: Mon, 04 Jul 2022 10:06:50 +0900
Message-ID: <CANatvzwLo=QT6n8f2gjAgf+03gQACo0rLkMetBMGER35RoVayA@mail.gmail.com>
To: Martin Thomson <mt@lowentropy.net>
Cc: HTTP Working Group <ietf-http-wg@w3.org>, Ian Swett <ianswett@google.com>
Content-Type: multipart/alternative; boundary="0000000000007aad6905e2f05a91"
Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=kazuhooku@gmail.com; helo=mail-ej1-x62b.google.com
X-W3C-Hub-DKIM-Status: validation passed: (address=kazuhooku@gmail.com domain=gmail.com), signature is good
X-W3C-Hub-Spam-Status: No, score=-4.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_WL=-1
X-W3C-Scan-Sig: titan.w3.org 1o8AYU-0096T3-KE ed191cb22c3f886e2842ef692e8051c2
X-Original-To: ietf-http-wg@w3.org
Subject: Re: RFC 9113 and :authority header field
Archived-At: <https://www.w3.org/mid/CANatvzwLo=QT6n8f2gjAgf+03gQACo0rLkMetBMGER35RoVayA@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/40234
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>

Thanks to Tatsuhiro and to all others for bringing the discussion.

2022年6月29日(水) 9:37 Martin Thomson <mt@lowentropy.net>:

> On Wed, Jun 29, 2022, at 09:58, Tatsuhiro Tsujikawa wrote:
> > I think 2) is valid in terms of RFC 7540, but it suddenly becomes
> > invalid in terms of RFC 9113?
> > Is this correct?  https://www.fastly.com and https://www.google.com now
> > reject 2).
>
> My understanding is that both are valid alternatives.  As would a third
> option that contained the same value in both host and :authority.  The 4xx
> responses you are getting are (probably) compliance bugs.
>

Are you suggesting that RFC 9113 has an error, or am I missing something? I
ask this because RFC 9113 section 8.3.1 states:
"Clients that generate HTTP/2 requests directly MUST use the ":authority"
pseudo-header field to convey authority information, unless there is no
authority information to convey (in which case it MUST NOT generate "
:authority")."
and
"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")."

My interpretation of these MUSTs is that a client is forbidden to create a
HTTP/2 request that omits an `:authority` header field (unless the method
or the URI permits it to).


>
> Thankfully we know people who might be closer to someone who is able to
> fix or defend those bugs.  (On CC).
>
> This whole host and :authority thing was an original mistake in HTTP/2.
> It was grounded in the view that HTTP/2 had to faithfully capture every
> weird thing HTTP/1.1 could express, even when it didn't make sense.  At the
> time, that was pragmatic and it might have aided deployment into systems
> that were, on some levels, broken.  In time, we should seek to remove those
> exceptions.  In the revision, we did some of that by disallowing different
> values.
>


-- 
Kazuho Oku