branch: externals/websocket commit 06dcb68721b1900bc9eb12fa78c15c93c110a4b3 Author: xhcoding <xhcod...@163.com> Commit: xhcoding <xhcod...@163.com>
fix QWebsocketServer may send RST during handshake --- websocket.el | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/websocket.el b/websocket.el index a8a0321540..56f768855e 100644 --- a/websocket.el +++ b/websocket.el @@ -744,15 +744,14 @@ to the websocket protocol. (when (and (eq 'connecting (websocket-ready-state websocket)) (memq (process-status conn) (list 'run (if nowait 'connect 'open)))) - (process-send-string conn - (format "GET %s HTTP/1.1\r\n" - (let ((path (url-filename url-struct))) - (if (> (length path) 0) path "/")))) (websocket-debug websocket "Sending handshake, key: %s, acceptance: %s" key (websocket-accept-string websocket)) (process-send-string conn - (websocket-create-headers - url key protocols extensions custom-header-alist))))) + (format "GET %s HTTP/1.1\r\n%s" + (let ((path (url-filename url-struct))) + (if (> (length path) 0) path "/")) + (websocket-create-headers + url key protocols extensions custom-header-alist)))))) (defun websocket-process-headers (url headers) "On opening URL, process the HEADERS sent from the server."