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 authored and RafaelGSS committed Dec 15, 2023
1 parent aa2be4b commit cc94986
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 cc94986

Please sign in to comment.