Subject: question about :authority header field

From: Tatsuhiro Tsujikawa <[email-masked]>
Date: Wed, 23 Oct 2013 21:56:55 +0900

I first thought that :host was just renamed as :authority.
For HTTP/2 client, it is just so, but for HTTP/2 servers, the situation is
a bit more complicated.

According to the section-8.1.3.1, intermediary is supposed to the following
conversion. Is this correct?

* intermediary converting HTTP/1.1 request to HTTP/2

## origin-form
GET / HTTP/1.1
Host: example.org

->

:method: GET
:scheme: http
:path: /
host: example.org

## absolute-form
GET http://example.org/ HTTP/1.1
Host: example.org

->

:method: GET
:scheme: http
:authority: example.org
:path: /
host: example.org

## authority-form
CONNECT example.org:443 HTTP/1.1
Host: example.org

->

:method: CONNECT
:authority: example.org:443
host: example.org

## asterisk-form
OPTIONS * HTTP/1.1
Host: example.org

->

:method: OPTIONS
:scheme: http
:path: *
host: example.org

As described in origin-form and asterisk-form, HTTP/2 server is expected to
process the request which lacks :authority as valid, where in draft-06,
server rejects it if :host is missing. Is this correct?

Best regards,
Tatsuhiro Tsujikawa

---

From: Martin Thomson <[email-masked]>
Date: Wed, 23 Oct 2013 10:40:44 -0700

> server rejects it if :host is missing. Is this correct?

Your examples are all correct.

The major change between HTTP/2.0 and HTTP/1.1 is that the host header
is now optional.  It can be omitted if the absolute form (i.e.,
:authority) is used.  In fact, we obliquely encourage implementations
to omit host.

This places a constraint on an implementation that converts from 2.0
to 1.1; if host is not set it has to copy it from :authority.

But nothing has really changed other than that, host -> host and URL
authority -> :authority.

---

From: RUELLAN Herve <[email-masked]>
Date: Tue, 29 Oct 2013 17:57:28 +0000

This is linked to issue #294: if we want to encourage implementations to omit host, we should probably leave it out of the static header table.

Hervé.

> -----Original Message-----
> From: Martin Thomson [mailto:[email-masked]]
> Sent: mercredi 23 octobre 2013 19:41
> To: Tatsuhiro Tsujikawa
> Cc: [email-masked]
> Subject: Re: question about :authority header field
> 
> > As described in origin-form and asterisk-form, HTTP/2 server is
> > expected to process the request which lacks :authority as valid, where
> > in draft-06, server rejects it if :host is missing. Is this correct?
> 
> The major change between HTTP/2.0 and HTTP/1.1 is that the host header is
> now optional.  It can be omitted if the absolute form (i.e.,
> :authority) is used.  In fact, we obliquely encourage implementations to omit
> host.
> 
> This places a constraint on an implementation that converts from 2.0 to 1.1; if
> host is not set it has to copy it from :authority.
> 
> But nothing has really changed other than that, host -> host and URL authority -
> > :authority.

---

From: Martin Thomson <[email-masked]>
Date: Tue, 29 Oct 2013 10:58:54 -0700

> This is linked to issue #294: if we want to encourage implementations to omit host, we should probably leave it out of the static header table.

Encouraging avoidance doesn't mean that we should penalize it.  Adding
Host to the table probably doesn't have a huge impact, but I see no
reason not to add it.

---

From: Tatsuhiro Tsujikawa <[email-masked]>
Date: Fri, 1 Nov 2013 01:57:01 +0900

On Wed, Oct 30, 2013 at 2:57 AM, RUELLAN Herve
<[email-masked]>wrote:

> This is linked to issue #294: if we want to encourage implementations to
> omit host, we should probably leave it out of the static header table.
>
>
This is true for HTTP/2.0 client which generates HTTP/2.0 request directly.
But an intermediaries translating from HTTP/1 request to HTTP/2.0 are
instructed to omit :authority and instead use host header field for
origin-form or asterisk-form.
Since HTTP/1 does not disappear suddenly, we will continue to use host
header in HTTP/2.0 traffic in foreseeable future.

Best regards,
Tatsuhiro Tsujikawa

> authority -