Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #383 from thefosk/master

Fixing a bug that generates an unexpected TypeError
  • Loading branch information...
commit ea10bb22d9e8fb3d90bf3ec34d98df99a2e3466a 2 parents 3ebc795 + c9b6895
@indexzero indexzero authored
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) {
Please sign in to comment.
Something went wrong with that request. Please try again.