Skip to content

Commit

Permalink
Merge pull request #383 from thefosk/master
Browse files Browse the repository at this point in the history
Fixing a bug that generates an unexpected TypeError
  • Loading branch information
indexzero committed Mar 18, 2013
2 parents 3ebc795 + c9b6895 commit ea10bb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/node-http-proxy/http-proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ HttpProxy.prototype.proxyRequest = function (req, res, buffer) {
delete response.headers['transfer-encoding'];
}

if ((response.statusCode === 301) || (response.statusCode === 302)
if ((response.statusCode === 301 || response.statusCode === 302)
&& typeof response.headers.location !== 'undefined') {
location = url.parse(response.headers.location);
if (location.host === req.headers.host) {
Expand Down

0 comments on commit ea10bb2

Please sign in to comment.