diff --git a/lib/web/fetch/util.js b/lib/web/fetch/util.js index b3523cb2e15..37c8c78fc5d 100644 --- a/lib/web/fetch/util.js +++ b/lib/web/fetch/util.js @@ -437,6 +437,8 @@ function stripURLForReferrer (url, originOnly) { // 1. Assert: url is a URL. assert(url instanceof URL) + url = new URL(url) + // 2. If url’s scheme is a local scheme, then return no referrer. if (url.protocol === 'file:' || url.protocol === 'about:' || url.protocol === 'blank:') { return 'no-referrer' diff --git a/test/wpt/status/fetch.status.json b/test/wpt/status/fetch.status.json index 860e053b3c5..3b2bfa002f0 100644 --- a/test/wpt/status/fetch.status.json +++ b/test/wpt/status/fetch.status.json @@ -76,10 +76,8 @@ "skip": true }, "request-referrer.any.js": { - "note": "TODO(@KhafraDev): url referrer test could probably be fixed", "fail": [ - "about:client referrer", - "url referrer" + "about:client referrer" ] }, "request-upload.any.js": {