Store the referrer in the Response and return it in Response::metadata().

This commit is contained in:
Ms2ger 2016-10-19 16:31:52 +02:00
parent a66f186866
commit 28d06ab40a
2 changed files with 6 additions and 1 deletions

View file

@ -1024,7 +1024,8 @@ fn http_network_fetch(request: Rc<Request>,
response.status = Some(res.response.status);
response.raw_status = Some((res.response.status_raw().0,
res.response.status_raw().1.as_bytes().to_vec()));
response.headers = res.response.headers.clone();
response.headers = res.response.headers.clone();
response.referrer = request.referrer.borrow().to_url().cloned();
let res_body = response.body.clone();