Conversation
|
@ddbeck When you get a chance, could you look at this. Mostly I am confirming that this is reasonable to have in the BCD (at all). I can then perhaps do some experimentation to determine versions it might appear. |
|
@hamishwillee when you say that anything that supports WebSockets should support this, are you saying that the browser should send an |
Yes, that is my understanding. Any system that supports web sockets via HTTP1.1 will create a normal HTTP connection then send UPGRADE to upgrade to a socket protocol. The "How it works" is extensively documented on MDN, and you can see it in the various points in the code on search. This also how a system with an HTTP1.1 connection might upgrade to HTTP 2.0 (see here). Anyway, sounds like this is worth having BCD for. Not sure how we'll work out how to verify this, and particular versions. Theoretically we could probably just copy the BCD for websockets, since this is main use case: https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API |
|
@Elchi3 Do you have any thoughts on how we might confirm support for such a feature? I haven't reviewed much of the HTTP data and wanted to double check with you first. |
I think it is difficult and not worth spending cycles on. I have more thoughts on this matter, you can find them in this thread from August 2019 (it is still valid): https://discourse.mozilla.org/t/bcd-and-want-digest-digest-http-headers/43340 (basically there are headers where browser support matters and also where it doesn't). |
Co-authored-by: Florian Scholz <[email protected]>
|
Thanks @Elchi3 . I've accepted the proposed changes. I think this is a case where it is useful to state support, and doing that with "true" is better than nothing (i.e. option "3" in linked doc). More generally, if it isn't clear what support means OR we can't verify support because it depends on the server I lean towards option 4 or omitting the section altogether. @ddbeck Ready to merge, or will do "option 4" if you just close this (indicating you think it isn't of value) |
ddbeck
left a comment
There was a problem hiding this comment.
This is good enough for me. 👍
HTTP upgrade header is HTTP1.1 (only) header that can be used to upgrade a connection to using another protocol - e.g. HTTP2. Mostly commonly it is used for upgrading an HTTP or HTTPS connection to a websocket. I just added a new page for this on MDN and it could use a BCD entry. Page is here: https://wiki.developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Upgrade
@ddbeck We've had some discussion about whether some headers are relevant; I'm still not certain of "all" the logic for making that decision, but I think this one is. At least it is clear what a browser must do to be compliant - it must switch to the supported protocol it has requested if it gets the switched protocol status from a server.
Anything that supports websockets probably supports this header and there is plenty of better evidence that this header is supported in Firefox and also in Chromium. However, I can't find any version information.
Feeling pretty useless, but decided to post this for discussion.