diff --git a/components/net/http_loader.rs b/components/net/http_loader.rs index 47eda62a8cb..f00687e9a44 100644 --- a/components/net/http_loader.rs +++ b/components/net/http_loader.rs @@ -542,7 +542,7 @@ pub fn http_fetch(request: Rc, // Sub-substep 1 if method_mismatch || header_mismatch { - let preflight_result = cors_preflight_fetch(request.clone(), cache, context); + let preflight_result = cors_preflight_fetch(&request, cache, context); // Sub-substep 2 if let Some(e) = preflight_result.get_network_error() { return Response::network_error(e.clone()); @@ -1204,7 +1204,7 @@ fn http_network_fetch(request: Rc, } /// [CORS preflight fetch](https://fetch.spec.whatwg.org#cors-preflight-fetch) -fn cors_preflight_fetch(request: Rc, +fn cors_preflight_fetch(request: &Request, cache: &mut CorsCache, context: &FetchContext) -> Response {