You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Sander Hoentjen <sa...@hoentjen.eu> on 2017/04/03 11:10:23 UTC

Upgrade header

Hi Stefan (and others),

Right now when I enable h2 and/or h2c Apache will respond with headers
"Upgrade: h2,h2c" and Connection: Upgrade
As I understand it this is the wrong way around. Only the client should
send the Upgrade headers, and only then should the server respond with a
101 with the Upgrade header only specifying the proto that is being
switched to.
Is this a bug, or does Apache respond intentionally with the Upgrade
header? If intentional, then what is the reason?

Regards,
Sander

Re: Upgrade header

Posted by Stefan Eissing <st...@greenbytes.de>.
https://tools.ietf.org/html/rfc7230#section-6.7:

"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."

Yes, it is intentional to advertise this to clients on the first request
of a connection. To disable this, you can "unset" such a header via
mod_headers.

Hope this helps.

-Stefan

> Am 03.04.2017 um 13:10 schrieb Sander Hoentjen <sa...@hoentjen.eu>:
> 
> Hi Stefan (and others),
> 
> Right now when I enable h2 and/or h2c Apache will respond with headers
> "Upgrade: h2,h2c" and Connection: Upgrade
> As I understand it this is the wrong way around. Only the client should
> send the Upgrade headers, and only then should the server respond with a
> 101 with the Upgrade header only specifying the proto that is being
> switched to.
> Is this a bug, or does Apache respond intentionally with the Upgrade
> header? If intentional, then what is the reason?
> 
> Regards,
> Sander