diff options
author | Adit Jain <aditjain1980@gmail.com> | 2019-01-17 12:02:18 +0530 |
---|---|---|
committer | aditj <aditjain1980@gmail.com> | 2019-01-24 23:18:54 +0530 |
commit | 77c928578094d7c9ed2f0c584f9f63e318c7c8c4 (patch) | |
tree | 77a29a6bfe38a06db0101a4a7522f5231b33c6b6 /components/net/fetch/methods.rs | |
parent | 3ca82471c84c805afd46321bf3cb61a97960ff69 (diff) | |
download | servo-77c928578094d7c9ed2f0c584f9f63e318c7c8c4.tar.gz servo-77c928578094d7c9ed2f0c584f9f63e318c7c8c4.zip |
Added fetch_start functionality in http_fetch
Added spec link for webidl.
Added fetch_start functionality to PRT .
Changed the fetch_start location
Diffstat (limited to 'components/net/fetch/methods.rs')
-rw-r--r-- | components/net/fetch/methods.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/components/net/fetch/methods.rs b/components/net/fetch/methods.rs index 12aff01e9a4..4022ca6b9bb 100644 --- a/components/net/fetch/methods.rs +++ b/components/net/fetch/methods.rs @@ -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); } |