From bd7c52dfa236ba5f7cb45f728c93bdb5bd08bf29 Mon Sep 17 00:00:00 2001 From: James Coglan Date: Sun, 1 Apr 2012 22:57:16 +0100 Subject: [PATCH] Use / as the default path if the client URI has no path. --- lib/faye/websocket/hybi_parser/handshake.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/faye/websocket/hybi_parser/handshake.js b/lib/faye/websocket/hybi_parser/handshake.js index 24a4bc5..304564e 100644 --- a/lib/faye/websocket/hybi_parser/handshake.js +++ b/lib/faye/websocket/hybi_parser/handshake.js @@ -46,7 +46,7 @@ Handshake.prototype.requestData = function() { var u = this._uri; var headers = [ - 'GET ' + u.pathname + (u.search || '') + ' HTTP/1.1', + 'GET ' + (u.pathname || '/') + (u.search || '') + ' HTTP/1.1', 'Host: ' + u.hostname + (u.port ? ':' + u.port : ''), 'Upgrade: websocket', 'Connection: Upgrade',