Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
skillsoftstevemarusa committed Oct 4, 2021
1 parent 916a416 commit 5a91f2b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -381,7 +381,7 @@ RedirectableRequest.prototype._processResponse = function (response) {
var redirectUrlParts = url.parse(redirectUrl);
Object.assign(this._options, redirectUrlParts);

// Drop the Host & Authorization header if redirecting to another host
// Drop the Authorization header if redirecting to another host
if (redirectUrlParts.host !== previousHost) {
removeMatchingHeaders(/^authorization$/i, this._options.headers);
}
Expand Down
2 changes: 1 addition & 1 deletion test/test.js
Expand Up @@ -1243,7 +1243,7 @@ describe("follow-redirects", function () {
});
});

it("uses the existing host header if redirect host is the same", function () {
it("uses the location host if redirect host is the same", function () {
app.get("/a", redirectsTo(302, "http://localhost:3600/b"));
app.get("/b", function (req, res) {
res.write(JSON.stringify(req.headers));
Expand Down

0 comments on commit 5a91f2b

Please sign in to comment.