mirror of
https://github.com/denoland/deno.git
synced 2025-09-27 12:49: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
|
@ -227,6 +227,7 @@ pub async fn op_fetch_send(
|
|||
|
||||
//debug!("Fetch response {}", url);
|
||||
let status = res.status();
|
||||
let url = res.url().to_string();
|
||||
let mut res_headers = Vec::new();
|
||||
for (key, val) in res.headers().iter() {
|
||||
let key_string = key.to_string();
|
||||
|
@ -261,6 +262,7 @@ pub async fn op_fetch_send(
|
|||
"status": status.as_u16(),
|
||||
"statusText": status.canonical_reason().unwrap_or(""),
|
||||
"headers": res_headers,
|
||||
"url": url,
|
||||
"responseRid": rid,
|
||||
}))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue