From a890322a9d549d308cb6b1116aedb19b52a5cd75 Mon Sep 17 00:00:00 2001 From: Khafra Date: Fri, 23 Feb 2024 17:22:30 -0500 Subject: [PATCH] fix url referrer wpt --- lib/web/fetch/util.js | 2 ++ test/wpt/status/fetch.status.json | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) 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": {