WebSocket
约 1 分钟阅读
Sec-Websocket-Extensions: permessage-deflate; client_max_window_bits
Sec-Websocket-Key: 3jdknZ3cA9awItgV8bJ88A==
Sec-Websocket-Version: 13- Sec-Websocket-Extensions
- permessage-deflate - 启用压缩
- client_max_window_bits - 最大压缩窗口大小
- Sec-Websocket-Key
- 16 字节随机值
- 用于验证服务器正确理解 WebSocket
- 返回 Sec-WebSocket-Accept
- Sec-Websocket-Version
- 13
curl \
--include \
--no-buffer \
--header "Connection: Upgrade" \
--header "Upgrade: websocket" \
--header "Host: example.com:80" \
--header "Origin: http://example.com:80" \
--header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \
--header "Sec-WebSocket-Version: 13" \
http://example.com:80/WebSockets over HTTP/2
- rfc8441RFCRFC 8441IETF Request for Comments standard document.RFC Bootstrapping WebSockets with HTTP/2
- Chrome 91
- HAProxy 2.4.9 - haproxy#1364GitHub Issuehaproxy/haproxy#1364
- Golang 暂不支持
- golang/go#32763GitHub Issuegolang/go#32763
- nhooyr/websocket#4GitHub Issuenhooyr/websocket#4
关联信息
反向链接、本文链接的其他页面和外部资料。
参考资料
GitHub3 条
- golang/go#32763github.com/golang/go/issues/32763
- haproxy/haproxy#1364github.com/haproxy/haproxy/issues/1364
- nhooyr/websocket#4github.com/nhooyr/websocket/issues/4
标准文档1 条
- RFC 8441datatracker.ietf.org/doc/html/rfc8441RFC
IETF Request for Comments standard document.
其他外链1 条
- www.chromestatus.com/feature/6251293127475200www.chromestatus.com/feature/6251293127475200