mirror of
https://github.com/denoland/deno.git
synced 2025-09-27 04:39:10 +00:00
fix: redirect in --location relative fetch (#9150)
This commit is contained in:
parent
12577f2d9a
commit
7a30d1a3d8
5 changed files with 13 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue