diff --git a/CHANGELOG b/CHANGELOG index aa3f027..55931ef 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,8 @@ -23 Feb 2015: anyproxy 3.2.4: +20 Mar 2015: anyproxy 3.2.5: + + * bugfix for internal https server + +19 Mar 2015: anyproxy 3.2.4: * bugfix for absolute rule path diff --git a/lib/requestHandler.js b/lib/requestHandler.js index 3a92b80..8770cd5 100644 --- a/lib/requestHandler.js +++ b/lib/requestHandler.js @@ -275,22 +275,26 @@ function connectReqHandler(req, socket, head){ internalHttpsPort, httpsServerMgrInstance; - async.series([ //check if internal https server exists function(callback){ - if(internalHttpsPort){ + if(!shouldIntercept){ callback(); + return; }else{ - getPort(function(port){ - internalHttpsPort = port; - httpsServerMgrInstance = new httpsServerMgr({ - port :port, - handler :userRequestHandler - }); + if(internalHttpsPort){ callback(); - }); + }else{ + getPort(function(port){ + internalHttpsPort = port; + httpsServerMgrInstance = new httpsServerMgr({ + port :port, + handler :userRequestHandler + }); + callback(); + }); + } } }, diff --git a/package.json b/package.json index 7ad31a3..b37fb32 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "anyproxy", - "version": "3.2.4", + "version": "3.2.5", "description": "A fully configurable proxy in NodeJS, which can handle HTTPS requests perfectly.", "main": "proxy.js", "bin": {