Remove subprotocol 111 (#1025)

This subprotocol seem to be a test string. Typical usage for websocket does not requires or does not support specifying subprotocol. For example, one popular websocket-based textractor websocket listener, https://github.com/Renji-XD/texthooker-ui,  assumes no subprotocol.
This commit is contained in:
Likai Yan 2024-08-25 02:24:35 -07:00 committed by GitHub
parent 80001c669b
commit 483ea36170
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -49,7 +49,6 @@ class websocketserver:
response = "HTTP/1.1 101 Switching Protocols\r\n"
response += "Upgrade: websocket\r\n"
response += "Connection: Upgrade\r\n"
response += "sec-websocket-protocol: 111\r\n"
response += f"Sec-WebSocket-Accept: {hashed}\r\n\r\n"
# 发送握手响应给客户端