From 031452e4007f1084a760e78be6908319c12c2c1c Mon Sep 17 00:00:00 2001 From: yawnt Date: Tue, 17 Sep 2013 10:31:52 +0200 Subject: [PATCH] [fix] closes #473 --- lib/caronte/passes/ws-incoming.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/caronte/passes/ws-incoming.js b/lib/caronte/passes/ws-incoming.js index ef88de3..e5bdcf6 100644 --- a/lib/caronte/passes/ws-incoming.js +++ b/lib/caronte/passes/ws-incoming.js @@ -75,6 +75,9 @@ function XHeaders(req, socket, options) { function stream(req, socket, options, head) { common.setupSocket(socket); + if (head && head.length) socket.unshift(head); + + var proxyReq = (~['https:', 'wss:'].indexOf(options.target.protocol) ? https : http).request( common.setupOutgoing(options.ssl || {}, options, req) );