From 621d018dbd6a03baa6ec93b7dc28782d0c2c1230 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Mon, 7 Nov 2016 09:37:21 +0100 Subject: [PATCH] Stop unnecessarily wrapping the response argument to http_redirect_fetch in Rc. --- components/net/fetch/methods.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/net/fetch/methods.rs b/components/net/fetch/methods.rs index 0e066e918aa..d480b419d2c 100644 --- a/components/net/fetch/methods.rs +++ b/components/net/fetch/methods.rs @@ -607,7 +607,7 @@ fn http_fetch(request: Rc, RedirectMode::Follow => { // set back to default 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) } } @@ -677,7 +677,7 @@ fn http_fetch(request: Rc, /// [HTTP redirect fetch](https://fetch.spec.whatwg.org#http-redirect-fetch) fn http_redirect_fetch(request: Rc, cache: &mut CORSCache, - response: Rc, + response: Response, cors_flag: bool, target: &mut Target, done_chan: &mut DoneChannel, @@ -688,7 +688,7 @@ fn http_redirect_fetch(request: Rc, // Step 2 if !response.actual_response().headers.has::() { - return Rc::try_unwrap(response).ok().unwrap(); + return response; } // Step 3