mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Added fetch_start functionality in http_fetch
Added spec link for webidl. Added fetch_start functionality to PRT . Changed the fetch_start location
This commit is contained in:
parent
3ca82471c8
commit
77c9285780
6 changed files with 27 additions and 20 deletions
|
@ -23,6 +23,7 @@ use net_traits::filemanager_thread::RelativePos;
|
|||
use net_traits::request::{CredentialsMode, Destination, Referrer, Request, RequestMode};
|
||||
use net_traits::request::{Origin, ResponseTainting, Window};
|
||||
use net_traits::response::{Response, ResponseBody, ResponseType};
|
||||
use net_traits::ResourceAttribute;
|
||||
use net_traits::{FetchTaskTarget, NetworkError, ReferrerPolicy, ResourceFetchTiming};
|
||||
use servo_url::ServoUrl;
|
||||
use std::borrow::Cow;
|
||||
|
@ -88,6 +89,12 @@ pub type DoneChannel = Option<(Sender<Data>, Receiver<Data>)>;
|
|||
|
||||
/// [Fetch](https://fetch.spec.whatwg.org#concept-fetch)
|
||||
pub fn fetch(request: &mut Request, target: Target, context: &FetchContext) {
|
||||
// Step 7 of https://w3c.github.io/resource-timing/#processing-model
|
||||
context
|
||||
.timing
|
||||
.lock()
|
||||
.unwrap()
|
||||
.set_attribute(ResourceAttribute::FetchStart);
|
||||
fetch_with_cors_cache(request, &mut CorsCache::new(), target, context);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue