mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
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:
1 parent
aa2be4bb76
commit
cc949869a3
1 file changed
+1
-1
@@ -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 = '';
|
||||
|
||||
|
||||
Reference in new issue
Block a user