mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Stop unnecessarily wrapping the response argument to http_redirect_fetch in Rc.
This commit is contained in:
parent
f5a3d68513
commit
621d018dbd
1 changed files with 3 additions and 3 deletions
|
@ -607,7 +607,7 @@ fn http_fetch<UI: 'static + UIProvider>(request: Rc<Request>,
|
||||||
RedirectMode::Follow => {
|
RedirectMode::Follow => {
|
||||||
// set back to default
|
// set back to default
|
||||||
response.return_internal.set(true);
|
response.return_internal.set(true);
|
||||||
http_redirect_fetch(request, cache, Rc::new(response),
|
http_redirect_fetch(request, cache, response,
|
||||||
cors_flag, target, done_chan, context)
|
cors_flag, target, done_chan, context)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -677,7 +677,7 @@ fn http_fetch<UI: 'static + UIProvider>(request: Rc<Request>,
|
||||||
/// [HTTP redirect fetch](https://fetch.spec.whatwg.org#http-redirect-fetch)
|
/// [HTTP redirect fetch](https://fetch.spec.whatwg.org#http-redirect-fetch)
|
||||||
fn http_redirect_fetch<UI: 'static + UIProvider>(request: Rc<Request>,
|
fn http_redirect_fetch<UI: 'static + UIProvider>(request: Rc<Request>,
|
||||||
cache: &mut CORSCache,
|
cache: &mut CORSCache,
|
||||||
response: Rc<Response>,
|
response: Response,
|
||||||
cors_flag: bool,
|
cors_flag: bool,
|
||||||
target: &mut Target,
|
target: &mut Target,
|
||||||
done_chan: &mut DoneChannel,
|
done_chan: &mut DoneChannel,
|
||||||
|
@ -688,7 +688,7 @@ fn http_redirect_fetch<UI: 'static + UIProvider>(request: Rc<Request>,
|
||||||
|
|
||||||
// Step 2
|
// Step 2
|
||||||
if !response.actual_response().headers.has::<Location>() {
|
if !response.actual_response().headers.has::<Location>() {
|
||||||
return Rc::try_unwrap(response).ok().unwrap();
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Step 3
|
// Step 3
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue