Skip to content

Commit

Permalink
Remove subprotocol 111 (#1025)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
siriuxy authored Aug 25, 2024
1 parent 80001c6 commit 483ea36
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion LunaTranslator/LunaTranslator/textoutput/websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def handle_client(self, client_socket: socket.socket):
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"

# 发送握手响应给客户端
Expand Down

0 comments on commit 483ea36

Please sign in to comment.