Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How well supported is the HTTP Upgrade mechanism?

Tags:

http

ssl

I have been studying the Upgrade header field in HTTP 1.1 (RFC 2817) and happened to read the wikipedia entry for HTTP. That article has the following statement:

"Browser support for the Upgrade header is, however, nearly non-existent, so HTTPS is still the dominant method of establishing a secure HTTP connection."

I was hoping to implement my web service so that it relied on the Upgrade header field in order to avoid having to listen on two sockets (one for HTTP and the other for HTTPS). This statement, which I have not been able to verify any other place, makes me somewhat nervous about doing so. Is the above statement in wikipedia anywhere near correct or is it a gross generalisation?

like image 969
Jon Trauntvein Avatar asked Nov 04 '10 22:11

Jon Trauntvein


1 Answers

I was researching this for that Wikipedia page actually and came across this question. I've looked around and here's the browser support situation as near as I can tell:

  • Chromium supports the Upgrade header as indicated by, for instance, this bug.
  • Firefox does not support "Upgrade: TLS" despite an open bug from 2005, last comment from 2010. My guess is they won't be adding it anytime soon.
  • Internet Explorer 10+ probably does, given this article that describes using Upgrade to connect to a websocket server. This commit message also implies IE 10 supports "Upgrade: websocket".
  • Safari 6+ supports Upgrade (see here).

For all of the supported browsers, I only found examples of "Upgrade: websocket" usage, none saying that upgrades to TLS would work. So the overall answer is that it's risky to rely on this in a production application.

Server support seems better; Apache has had "Upgrade: TLS" support since 2.1.

like image 118
phette23 Avatar answered Nov 10 '22 04:11

phette23