Skip to content

Commit

Permalink
test: handle relative https redirect
Browse files Browse the repository at this point in the history
Fix `internet/test-inspector-help-page` to handle the relative
redirect of `https://nodejs.org/en/docs/inspector` to
`/en/docs/guides/debugging-getting-started`. Previously this
URL redirected to an absolute URL.

PR-URL: #51121
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
  • Loading branch information
richardlau committed Mar 20, 2024
1 parent 7bea2d7 commit cd613e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/internet/test-inspector-help-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function check(url, cb) {
assert(res.statusCode >= 200 && res.statusCode < 400);

if (res.statusCode >= 300)
return check(res.headers.location, cb);
return check(new URL(res.headers.location, url), cb);

let result = '';

Expand Down

0 comments on commit cd613e5

Please sign in to comment.