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

Upgrade header can be used to advertise protocol support #363

@veesahni

Description

@veesahni

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions