Skip to content

Commit 3e6ff05

Browse files
committed
Fixed redirects.
1 parent d569e2a commit 3e6ff05

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

utils.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -856,11 +856,10 @@ function request_response(res, uri, options) {
856856
var loc = res.headers['location'];
857857
var proto = loc.substring(0, 6);
858858

859-
if (proto !== 'http:/' && proto !== 'https:/')
859+
if (proto !== 'http:/' && proto !== 'https:')
860860
loc = uri.protocol + '//' + uri.hostname + loc;
861861

862862
var tmp = Url.parse(loc);
863-
864863
tmp.headers = uri.headers;
865864
tmp.agent = false;
866865
tmp.method = uri.method;

0 commit comments

Comments
 (0)