Skip to content

Commit cc94986

Browse files
richardlauRafaelGSS
authored andcommitted
test: handle relative https redirect
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]>
1 parent aa2be4b commit cc94986

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/internet/test-inspector-help-page.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function check(url, cb) {
1818
assert(res.statusCode >= 200 && res.statusCode < 400);
1919

2020
if (res.statusCode >= 300)
21-
return check(res.headers.location, cb);
21+
return check(new URL(res.headers.location, url), cb);
2222

2323
let result = '';
2424

0 commit comments

Comments
 (0)