Re: What is the HTTP/1.1 equivalent of ":scheme" in HTTP/2 and HTTP/3?

On Wed, Mar 22, 2023 at 3:17 PM Willy Tarreau <w@1wt.eu> wrote:

>
> It is the exact equivalent. In H2 (and H3) the pseudo headers are used
> to split the request or response line into individual fields and mostly
> use absolute requests since there's no need for on-wire compatibility
> with HTTP/0.9 or 1.0. As such, requests simply provide the contents that
> you normally find in an absolute URI split into :method, :scheme,
> :authority, :path, and the response contains :status (and the version
> and reason are dropped since useless).
>
> The only difference is that in HTTP/1 as you say, origin-form is the
> most common and in this case there is no scheme. However in this case,
> the server *knows* what scheme is being used by configuration, because
> a combination of listener port + clear/TLS implies a scheme for a given
> configuration.
>
> Typically if you're forwarding HTTP/1 over HTTP/2 you have to present
> a scheme that in fact reflects the processing that is applied on the
> HTTP/1 listener.
>
> Hoping this helps,
> Willy
>

Thank you, this is helpful!

-- 
Best regards,
Zhang Jingcheng
Beijing, China

Received on Wednesday, 22 March 2023 14:10:41 UTC