summaryrefslogtreecommitdiff
path: root/op_crates/fetch/26_fetch.js
diff options
context:
space:
mode:
authorLuca Casonato <lucacasonato@yahoo.com>2021-01-18 13:59:29 +0100
committerGitHub <noreply@github.com>2021-01-18 13:59:29 +0100
commit7a30d1a3d85b47434c1bdbd03052ade3dba3c77c (patch)
tree34df25c43fd690c7acd62d9a8c72704553eb80ae /op_crates/fetch/26_fetch.js
parent12577f2d9a08256417af2f1e92ed7f667f7a4a6a (diff)
fix: redirect in --location relative fetch (#9150)
Diffstat (limited to 'op_crates/fetch/26_fetch.js')
-rw-r--r--op_crates/fetch/26_fetch.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/op_crates/fetch/26_fetch.js b/op_crates/fetch/26_fetch.js
index c8a470033..52c281d3b 100644
--- a/op_crates/fetch/26_fetch.js
+++ b/op_crates/fetch/26_fetch.js
@@ -1373,7 +1373,7 @@
redirected,
rid: fetchResponse.bodyRid,
status: fetchResponse.status,
- url,
+ url: fetchResponse.url,
});
const response = new Response(responseBody, responseInit);
@@ -1404,7 +1404,7 @@
!redirectUrl.startsWith("http://") &&
!redirectUrl.startsWith("https://")
) {
- redirectUrl = new URL(redirectUrl, url).href;
+ redirectUrl = new URL(redirectUrl, fetchResponse.url).href;
}
url = redirectUrl;
redirected = true;