Skip to content
Browse files

Merge pull request #383 from thefosk/master

Fixing a bug that generates an unexpected TypeError
  • Loading branch information...
2 parents 3ebc795 + c9b6895 commit ea10bb22d9e8fb3d90bf3ec34d98df99a2e3466a @indexzero indexzero committed Mar 17, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/node-http-proxy/http-proxy.js
View
2 lib/node-http-proxy/http-proxy.js
@@ -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) {

0 comments on commit ea10bb2

Please sign in to comment.
Something went wrong with that request. Please try again.