Skip to content
This repository has been archived by the owner on Nov 6, 2022. It is now read-only.

Upgrade header can be used to advertise protocol support #363

Closed
veesahni opened this issue Apr 14, 2017 · 2 comments · Fixed by tmm1/http_parser.rb#57
Closed

Upgrade header can be used to advertise protocol support #363

veesahni opened this issue Apr 14, 2017 · 2 comments · Fixed by tmm1/http_parser.rb#57

Comments

@veesahni
Copy link

veesahni commented Apr 14, 2017

Per RFC7230 (which supercedes 2616):

A server MAY send an Upgrade header field in any other response to
advertise that it implements support for upgrading to the listed
protocols, in order of descending preference, when appropriate for a
future request.

Accordingly, Apache advertises HTTP2 support with Upgrade headers in normal HTTP responses:

HTTP/1.1 200 OK
Date: Fri, 14 Apr 2017 03:08:10 GMT
Server: Apache
Upgrade: h2,h2c
Connection: Upgrade
Content-Length: 26
Content-Type: text/html; charset=utf-8

However, for such upgrade advertisements, http-parser thinks an upgrade is in progress and doesn't process the body.

If an Upgrade header is present in a 200 response, it should be ignored. It's only an upgrade in a 101 response.

@bnoordhuis
Copy link
Member

#364

@ploxiln
Copy link
Contributor

ploxiln commented Jun 14, 2017

fix was merged

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants