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: https://github.com/nodejs/node/pull/51121
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
This commit is contained in:
Richard Lau authored and RafaelGSS committed 2023-12-15 15:26:24 -03:00
1 parent aa2be4bb76
commit cc949869a3
1 file changed
+1 -1
+1 -1
View File
@@ -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 = '';