In http 1.1, the status line was
scheme/version code reason
HTTP/1.1 200 OK
I see :scheme and :status headers in HPACK spec. I don't however see anything for version or reason? Is there not one?
In a request in http 1.1, the request line was
method uri scheme/version
POST http://myhost.com HTTP/1.1
I see :method and I see :path which I think is just a relative path which is not the same as the full absolute path(and since chrome and firefox are pushing on https for http2, this may make sense). I do not see version header though?
Is there a version header? or is it seen that this will always be known before protocol decision such that it is not really needed?
What about reason codes? Is it assumed these are pretty constant so that goes away(I am guessing here).
thanks, Dean
In HTTP/1, the version token was needed to differentiate HTTP/1.0 from HTTP/1.1, since they had the same wire representation, but were supporting different features.
For example, a client declaring HTTP/1.1 implicitly tells the server that it supports persistent connections and content chunking.
With HTTP/2, the protocol version is negotiated.
In clear-text HTTP/2, the
Upgrade
header reportsh2c
, where the2
means version 2 of the protocol. I imagine that for HTTP/3 the token will change toh3c
. Similarly happens for encrypted HTTP/2 where the tokenh2
is negotiated via ALPN.Reason messages have been dropped as being redundant, as the status code was already conveying all the necessary information (not to mention that they could be attack vectors).
For these reasons, HTTP/2 does not have neither version nor reason pseudo-headers.