Re: RFC 9113 and :authority header field

"Roy T. Fielding" <fielding@gbiv.com> Tue, 28 June 2022 17: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 EEBF2C14F744 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 28 Jun 2022 10:10:47 -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=gbiv.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 j0d_QVNI0jnZ for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 28 Jun 2022 10:10:44 -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 ED1DEC14CF04 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Tue, 28 Jun 2022 10:10:43 -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 1o6Ega-00AncL-Mc for ietf-http-wg-dist@listhub.w3.org; Tue, 28 Jun 2022 17:07:36 +0000
Resent-Date: Tue, 28 Jun 2022 17:07:36 +0000
Resent-Message-Id: <E1o6Ega-00AncL-Mc@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 <fielding@gbiv.com>) id 1o6EgZ-00AnbO-Np for ietf-http-wg@listhub.w3.org; Tue, 28 Jun 2022 17:07:35 +0000
Received: from anteater.ash.relay.mailchannels.net ([23.83.222.3]) by titan.w3.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <fielding@gbiv.com>) id 1o6EgX-006A0x-Je for ietf-http-wg@w3.org; Tue, 28 Jun 2022 17:07:34 +0000
X-Sender-Id: dreamhost|x-authsender|fielding@gbiv.com
Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id CE46982262E; Tue, 28 Jun 2022 17:07:16 +0000 (UTC)
Received: from pdx1-sub0-mail-a312.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 65B3F821E71; Tue, 28 Jun 2022 17:07:16 +0000 (UTC)
ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1656436036; a=rsa-sha256; cv=none; b=2LCazeIc9nkjmlq1MhbmQlyc/BNakEIuWE2qhRJN1+I0d5cFH5qGzsWbv8TWiaoPI14qgn xdcKgkSohCYFnNVLVU4Zh4nVul9I5nfg1cjZul6mKPUf9xc2qkbEN5tWif/tvSezyfWaR7 wqH4O6Ev4OkOeKQN6H5pohPuSyWzmgmY5pQkjhoLTCH6ezOvKGurZJpepRSXHOaJDblP4w Hb+Fo5TWvdTE2NlHIkmhDMX/VZa86Uzx92Wfx7PiBVixUZ+ExJxXFH2jHWMgBS9H02tK0R 0CbCZuMals81II0z9Em1YtjjWgjTh3nfGCjNrc8QJcCMC024c9YMyxWPb89YGg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1656436036; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:dkim-signature; bh=TjU8L3A5mOQaQVM1Jt2pzILjeLg3xEK/fHzjn73fHNM=; b=LlORw2m1BX/wZ7wnK3tJmx2jBZhl8Ag0GtqFC2OhZ0UFuwvySKopzO4Jn4zPLVdiJr/C4A bVULN+MxM7X1Am01/ZIjaWNtF01pv/FjL+G1DrlKrHS3yUCPubGi1i3sWsbFI9S5MJI2Kb U779dsnJgP+D/lKrkXfhv7SrjPbYQAeUb8K7pKvSWSpvHe0t3pIfGQ2tW0FB1oboGuTLgb ImQ+XwhKcsUPPM8DSMu8UKuxz95b6/IxnfgiQ4Z0Es6KsVKHCArsrHha5eNdryndW/1Vom Lf4LKml8vPfbzAlaGWnMjPnDGuio2/SmlhTmKN4s/YTF6BOE8kHlSaT/KCiW+A==
ARC-Authentication-Results: i=1; rspamd-689699966c-k7gzj; auth=pass smtp.auth=dreamhost smtp.mailfrom=fielding@gbiv.com
X-Sender-Id: dreamhost|x-authsender|fielding@gbiv.com
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|fielding@gbiv.com
X-MailChannels-Auth-Id: dreamhost
X-Sponge-Abiding: 3a9cdc8c0a47ab0f_1656436036643_1638608024
X-MC-Loop-Signature: 1656436036643:1658091058
X-MC-Ingress-Time: 1656436036643
Received: from pdx1-sub0-mail-a312.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.127.95.103 (trex/6.7.1); Tue, 28 Jun 2022 17:07:16 +0000
Received: from smtpclient.apple (ip72-194-77-117.oc.oc.cox.net [72.194.77.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: fielding@gbiv.com) by pdx1-sub0-mail-a312.dreamhost.com (Postfix) with ESMTPSA id 4LXWH75D09zLL; Tue, 28 Jun 2022 10:07:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gbiv.com; s=dreamhost; t=1656436035; bh=gfLewUi5IiazAPrsmWDaOY7jBzA6F6ahZyZFQgUeJXs=; h=From:Content-Type:Subject:Date:Cc:To; b=Z37c4GyjZj0/bNObPmwGy/oBaUlCBseDGu//Ddc7sTXwAloqAhWjf8xfQL4QEW4B7 65GFyzrrBGfXOkN9oYc+LGoWJV7Lmz7XljIO0kmTHtk8glDutKbGttEpA4ilnlYp70 /AVyk8Yijd8OXV+5GMIMQ1kWjeJr2TlaYafHcef0ndN70irsjco+/OLaDicjpXZa1X 6CFk8MeBwQuSAWu/+EmvDdyXmYXAR1XXWsnoLsQXkgdQtiikogk9qywadFMUHQ3sbZ aIQg77wmn0E98lcUVzLs7wBvcN7gX7cvTxuFGihYeIKZZCJSun7r/HLXwA9cmLFopS 6EA+xqBd4xtaA==
From: "Roy T. Fielding" <fielding@gbiv.com>
Message-Id: <D7142A8A-5B80-46F5-A653-2307EE2DC5D8@gbiv.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_254C470D-4123-440B-9266-233E6D358D5F"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.100.31\))
Date: Tue, 28 Jun 2022 10:07:14 -0700
In-Reply-To: <CAPyZ6=+q+MoOOwoCxbtFjt+gqsjHBqTzz9KXNVcs3EP-4VFp=Q@mail.gmail.com>
Cc: HTTP <ietf-http-wg@w3.org>
To: Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>
References: <CAPyZ6=+q+MoOOwoCxbtFjt+gqsjHBqTzz9KXNVcs3EP-4VFp=Q@mail.gmail.com>
X-Mailer: Apple Mail (2.3696.100.31)
Received-SPF: pass client-ip=23.83.222.3; envelope-from=fielding@gbiv.com; helo=anteater.ash.relay.mailchannels.net
X-W3C-Hub-DKIM-Status: validation passed: (address=fielding@gbiv.com domain=gbiv.com), signature is good
X-W3C-Hub-Spam-Status: No, score=-9.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, 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_IRR=-3, W3C_WL=-1
X-W3C-Scan-Sig: titan.w3.org 1o6EgX-006A0x-Je b72f7dfcf8bbc276200e7fc400f35c2e
X-Original-To: ietf-http-wg@w3.org
Subject: Re: RFC 9113 and :authority header field
Archived-At: <https://www.w3.org/mid/D7142A8A-5B80-46F5-A653-2307EE2DC5D8@gbiv.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/40212
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 Jun 28, 2022, at 8:20 AM, Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> wrote:
> 
> Now RFC 9113 is published, we have updated :authority header field description,
> basically it says host and :authority cannot disagree.
> My question is, is it still valid to omit :authority and use host?
> RFC 9113 says "client must use :authority header field", but :authority is not listed in mandatory header fields.
> I checked a few major sites, and it looks like www.fastly.com <http://www.fastly.com/> and www..google.com <http://www.google.com/> complain about the missing :authority.  www.fastly.com <http://www.fastly.com/> sends back RST_STREAM.  www.google.com <http://www.google.com/> returns 400 bad request.
> www.google.com <http://www.google.com/> still returns 400 if both :authority and host are present.

Those are all https sites. https URIs must have a non-empty host. Other URIs might
not have an authority section, and thus Host can be empty. I am not sure in that
case whether :authority is empty or omitted, though I would implement both as
equivalent for an HTTP server.

For example, an HTTP request for urn:ietf:std:97 would have an empty Host field
(to satisfy HTTP/1.1 requirements) and no :authority pseudo-header, IIRC.  The
certificate authority (for connecting with TLS) in that case would be in the URL
configured within the user agent as an HTTP proxy for urn:ietf:*, and thus it
wouldn't appear within the HTTP message.

Cheers,

....Roy