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 <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
  • Loading branch information
richardlau committed Mar 25, 2024
1 parent 5fc10ca commit 50df4ae
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 50df4ae

Please sign in to comment.