diff options
author | Luca Casonato <lucacasonato@yahoo.com> | 2020-11-24 21:00:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-24 21:00:35 +0100 |
commit | 501a31fcf3566788370e45bfb174547706f39337 (patch) | |
tree | 31b8360a7558574b04403c062e6001f0895790f1 /op_crates/fetch/26_fetch.js | |
parent | 276f5297556097461e0b63f2b958d825c1c857ab (diff) |
fix(op_crates/fetch): `redirect: "manual"` fetch should return `type: "default"` response (#8353)
Diffstat (limited to 'op_crates/fetch/26_fetch.js')
-rw-r--r-- | op_crates/fetch/26_fetch.js | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/op_crates/fetch/26_fetch.js b/op_crates/fetch/26_fetch.js index d0bc6d979..95ee96812 100644 --- a/op_crates/fetch/26_fetch.js +++ b/op_crates/fetch/26_fetch.js @@ -1342,15 +1342,11 @@ }); return new Response(null, responseInit); case "manual": - responseInit = {}; - responseData.set(responseInit, { - type: "opaqueredirect", - redirected: false, - url: "", - }); - return new Response(null, responseInit); + // On the web this would return a `opaqueredirect` response, but + // those don't make sense server side. See denoland/deno#8351. + return response; case "follow": - // fallthrough + // fallthrough default: { let redirectUrl = response.headers.get("Location"); if (redirectUrl == null) { |