Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
skillsoftstevemarusa committed Oct 5, 2021
1 parent dbfb0d4 commit ca6688b
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions index.js
Expand Up @@ -367,14 +367,7 @@ RedirectableRequest.prototype._processResponse = function (response) {

// If the redirect is relative, carry over the host of the last request from host header
var previousHostUrl = !url.parse(location).host ?
url.format({
protocol: currentUrlParts.protocol,
auth: currentUrlParts.auth,
host: previousHost,
pathname: currentUrlParts.pathname,
search: currentUrlParts.search,
hash: currentUrlParts.hash,
}) :
url.format(Object.assign({}, currentUrlParts, { host: previousHost })) :
this._currentUrl;

// Create the redirected request
Expand Down

0 comments on commit ca6688b

Please sign in to comment.