summaryrefslogtreecommitdiff
path: root/op_crates/fetch/lib.rs
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/lib.rs
parent12577f2d9a08256417af2f1e92ed7f667f7a4a6a (diff)
fix: redirect in --location relative fetch (#9150)
Diffstat (limited to 'op_crates/fetch/lib.rs')
-rw-r--r--op_crates/fetch/lib.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/op_crates/fetch/lib.rs b/op_crates/fetch/lib.rs
index f882736f5..256e7904d 100644
--- a/op_crates/fetch/lib.rs
+++ b/op_crates/fetch/lib.rs
@@ -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,
}))
}