mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Re-add support for fetching chunks (and thus xhr download progress)
This commit is contained in:
parent
6e29b872d7
commit
bf99e73cb0
5 changed files with 96 additions and 87 deletions
|
@ -494,15 +494,13 @@ impl CoreResourceManager {
|
|||
blocked_content: BLOCKED_CONTENT_RULES.clone(),
|
||||
};
|
||||
spawn_named(format!("fetch thread for {}", init.url), move || {
|
||||
let sync = init.synchronous;
|
||||
let request = Request::from_init(init);
|
||||
// XXXManishearth: Check origin against pipeline id
|
||||
// todo load context / mimesniff in fetch
|
||||
// todo referrer policy?
|
||||
// todo service worker stuff
|
||||
let mut target = Some(Box::new(sender) as Box<FetchTaskTarget + Send + 'static>);
|
||||
let response = fetch(Rc::new(request), &mut target, http_state);
|
||||
target.unwrap().fetch_done(&response, sync);
|
||||
fetch(Rc::new(request), &mut target, http_state);
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue