Skip to content

Commit ea10bb2

Browse files
committed
Merge pull request http-party#383 from thefosk/master
Fixing a bug that generates an unexpected TypeError
2 parents 3ebc795 + c9b6895 commit ea10bb2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/node-http-proxy/http-proxy.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ HttpProxy.prototype.proxyRequest = function (req, res, buffer) {
268268
delete response.headers['transfer-encoding'];
269269
}
270270

271-
if ((response.statusCode === 301) || (response.statusCode === 302)
271+
if ((response.statusCode === 301 || response.statusCode === 302)
272272
&& typeof response.headers.location !== 'undefined') {
273273
location = url.parse(response.headers.location);
274274
if (location.host === req.headers.host) {

0 commit comments

Comments
 (0)