mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Stop returning the response from fetch().
This commit is contained in:
parent
217f44b67a
commit
1e0ab08c42
1 changed files with 4 additions and 6 deletions
|
@ -44,16 +44,14 @@ pub type DoneChannel = Option<(Sender<Data>, Receiver<Data>)>;
|
||||||
/// [Fetch](https://fetch.spec.whatwg.org#concept-fetch)
|
/// [Fetch](https://fetch.spec.whatwg.org#concept-fetch)
|
||||||
pub fn fetch(request: Rc<Request>,
|
pub fn fetch(request: Rc<Request>,
|
||||||
target: Target,
|
target: Target,
|
||||||
context: &FetchContext)
|
context: &FetchContext) {
|
||||||
-> Response {
|
fetch_with_cors_cache(request, &mut CorsCache::new(), target, context);
|
||||||
fetch_with_cors_cache(request, &mut CorsCache::new(), target, context)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn fetch_with_cors_cache(request: Rc<Request>,
|
pub fn fetch_with_cors_cache(request: Rc<Request>,
|
||||||
cache: &mut CorsCache,
|
cache: &mut CorsCache,
|
||||||
target: Target,
|
target: Target,
|
||||||
context: &FetchContext)
|
context: &FetchContext) {
|
||||||
-> Response {
|
|
||||||
// Step 1
|
// Step 1
|
||||||
if request.window.get() == Window::Client {
|
if request.window.get() == Window::Client {
|
||||||
// TODO: Set window to request's client object if client is a Window object
|
// TODO: Set window to request's client object if client is a Window object
|
||||||
|
@ -112,7 +110,7 @@ pub fn fetch_with_cors_cache(request: Rc<Request>,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Step 7
|
// Step 7
|
||||||
main_fetch(request, cache, false, false, target, &mut None, &context)
|
main_fetch(request, cache, false, false, target, &mut None, &context);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// [Main fetch](https://fetch.spec.whatwg.org/#concept-main-fetch)
|
/// [Main fetch](https://fetch.spec.whatwg.org/#concept-main-fetch)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue