content
content copied to clipboard
HTTP Sec-WebSocket-* headers
This adds some missing HTTP headers Sec-WebSocket-Protocol, Sec-WebSocket-Version, Sec-WebSocket-Extensions, Sec-WebSocket-Key,.
These are used in the WebSocket protocol. The docs are source from the spec, and existing docs like https://developer.mozilla.org/en-US/docs/Web/HTTP/Protocol_upgrade_mechanism
They don't convey much extra over those other docs, but they are where people expect them to be.
Related docs in #26731
We should probably add BCD for some of these - specifically Sec-WebSocket-Protocol, Sec-WebSocket-Version, and Sec-WebSocket-Protocol, Sec-WebSocket-Key are set by the browser in requests.
PS Note, I did not strip the information from https://developer.mozilla.org/en-US/docs/Web/HTTP/Protocol_upgrade_mechanism because doing so would make that document a bit pointless.
Fix #34852
Preview URLs (8 pages)
/en-US/docs/Web/API/WebSocket/WebSocket/en-US/docs/Web/API/WebSocket/protocol/en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_servers/en-US/docs/Web/API/WebSockets_API/en-US/docs/Web/HTTP/Headers/Sec-WebSocket-Extensions/en-US/docs/Web/HTTP/Headers/Sec-WebSocket-Protocol/en-US/docs/Web/HTTP/Headers/Sec-WebSocket-Version/en-US/docs/Web/HTTP/Headers
Flaws (3)
Note! 5 documents with no flaws that don't need to be listed. 🎉
URL: /en-US/docs/Web/HTTP/Headers/Sec-WebSocket-Extensions
Title: Sec-WebSocket-Extensions
Flaw count: 1
- bad_bcd_queries:
No BCD data for query: http.headers.Sec-WebSocket-Extensions
URL: /en-US/docs/Web/HTTP/Headers/Sec-WebSocket-Protocol
Title: Sec-WebSocket-Protocol
Flaw count: 1
- bad_bcd_queries:
No BCD data for query: http.headers.Sec-WebSocket-Protocol
URL: /en-US/docs/Web/HTTP/Headers/Sec-WebSocket-Version
Title: Sec-WebSocket-Version
Flaw count: 1
- bad_bcd_queries:
No BCD data for query: http.headers.Sec-WebSocket-Version
External URLs (4)
URL: /en-US/docs/Web/HTTP/Headers/Sec-WebSocket-Extensions
Title: Sec-WebSocket-Extensions
- https://www.iana.org/assignments/websocket/websocket.xml (1 time) (Note! This may be a new URL 👀)
URL: /en-US/docs/Web/HTTP/Headers/Sec-WebSocket-Protocol
Title: Sec-WebSocket-Protocol
- https://www.iana.org/assignments/websocket/websocket.xml (1 time) (Note! This may be a new URL 👀)
URL: /en-US/docs/Web/HTTP/Headers/Sec-WebSocket-Version
Title: Sec-WebSocket-Version
- https://www.iana.org/assignments/websocket/websocket.xml (1 time) (Note! This may be a new URL 👀)
URL: /en-US/docs/Web/API/WebSocket/WebSocket
Title: WebSocket: WebSocket() constructor
- https://www.iana.org/assignments/websocket/websocket.xml (1 time) (Note! This may be a new URL 👀)
(comment last updated: 2024-09-09 01:22:59)
This would also fix https://github.com/mdn/content/issues/34852.
I do wonder if we can refactor the "Protocol upgrade mechanism" doc, but we should at least link to all these new header pages.
I do wonder if we can refactor the "Protocol upgrade mechanism" doc, but we should at least link to all these new header pages.
It already does link in the headings (which I dislike). Refactoring is a "sensitive" job because most of the information is duplicated, but if you remove it the upgrade page is near empty.
So yes, but not as part of this.
I don't feel confident reviewing this other than typesetting because I know nothing about WS; is Brian the only other committed HTTP reviewer?
@Josh-Cena Fair enough! @bsmth Added you as reviewer since you're doing "HTTP Stuff". @chrisdavidmills might also comment since he did original WS docs.
This pull request has merge conflicts that must be resolved before it can be merged.
Thanks @bsmth - I've accepted your changes. Much appreciated.
Thanks very much @bsmth!