[fix] proxy to http(s)

This commit is contained in:
yawnt 2013-09-15 13:03:51 +02:00
parent 46fe81e11a
commit 3c91ed3d26

View File

@ -75,7 +75,7 @@ function XHeaders(req, socket, options) {
function stream(req, socket, options, head) { function stream(req, socket, options, head) {
common.setupSocket(socket); common.setupSocket(socket);
var proxyReq = (options.ssl ? https : http).request( var proxyReq = (~['https:', 'wss:'].indexOf(options.target.protocol) ? https : http).request(
common.setupOutgoing(options.ssl || {}, options, req) common.setupOutgoing(options.ssl || {}, options, req)
); );