diff --git a/lib/modem.js b/lib/modem.js index a9b2826..03d2ac3 100644 --- a/lib/modem.js +++ b/lib/modem.js @@ -302,6 +302,9 @@ Modem.prototype.buildRequest = function (options, context, data, callback) { req.on('upgrade', function (res, sock, head) { if (finished === false) { finished = true; + if (head.length > 0) { + sock.unshift(head); + } return callback(null, sock); } });