diff options
Diffstat (limited to 'components/net/fetch')
-rw-r--r-- | components/net/fetch/cors_cache.rs | 14 | ||||
-rw-r--r-- | components/net/fetch/request.rs | 18 | ||||
-rw-r--r-- | components/net/fetch/response.rs | 8 |
3 files changed, 20 insertions, 20 deletions
diff --git a/components/net/fetch/cors_cache.rs b/components/net/fetch/cors_cache.rs index 32d2615c747..407e4813653 100644 --- a/components/net/fetch/cors_cache.rs +++ b/components/net/fetch/cors_cache.rs @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -//! An implementation of the [CORS preflight cache](http://fetch.spec.whatwg.org/#cors-preflight-cache) +//! An implementation of the [CORS preflight cache](https://fetch.spec.whatwg.org/#cors-preflight-cache) //! For now this library is XHR-specific. //! For stuff involving `<img>`, `<iframe>`, `<form>`, etc please check what //! the request mode should be and compare with the fetch spec @@ -74,24 +74,24 @@ pub struct CacheRequestDetails { /// Trait for a generic CORS Cache pub trait CORSCache { - /// [Clear the cache](http://fetch.spec.whatwg.org/#concept-cache-clear) + /// [Clear the cache](https://fetch.spec.whatwg.org/#concept-cache-clear) fn clear (&mut self, request: CacheRequestDetails); /// Remove old entries fn cleanup(&mut self); - /// Returns true if an entry with a [matching header](http://fetch.spec.whatwg.org/#concept-cache-match-header) is found + /// Returns true if an entry with a [matching header](https://fetch.spec.whatwg.org/#concept-cache-match-header) is found fn match_header(&mut self, request: CacheRequestDetails, header_name: &str) -> bool; - /// Updates max age if an entry for a [matching header](http://fetch.spec.whatwg.org/#concept-cache-match-header) is found. + /// Updates max age if an entry for a [matching header](https://fetch.spec.whatwg.org/#concept-cache-match-header) is found. /// /// If not, it will insert an equivalent entry fn match_header_and_update(&mut self, request: CacheRequestDetails, header_name: &str, new_max_age: u32) -> bool; - /// Returns true if an entry with a [matching method](http://fetch.spec.whatwg.org/#concept-cache-match-method) is found + /// Returns true if an entry with a [matching method](https://fetch.spec.whatwg.org/#concept-cache-match-method) is found fn match_method(&mut self, request: CacheRequestDetails, method: Method) -> bool; - /// Updates max age if an entry for [a matching method](http://fetch.spec.whatwg.org/#concept-cache-match-method) is found. + /// Updates max age if an entry for [a matching method](https://fetch.spec.whatwg.org/#concept-cache-match-method) is found. /// /// If not, it will insert an equivalent entry fn match_method_and_update(&mut self, request: CacheRequestDetails, method: Method, new_max_age: u32) -> bool; @@ -132,7 +132,7 @@ impl BasicCORSCache { } impl CORSCache for BasicCORSCache { - /// http://fetch.spec.whatwg.org/#concept-cache-clear + /// https://fetch.spec.whatwg.org/#concept-cache-clear #[allow(dead_code)] fn clear (&mut self, request: CacheRequestDetails) { let BasicCORSCache(buf) = self.clone(); diff --git a/components/net/fetch/request.rs b/components/net/fetch/request.rs index 76e2e5557d3..dd564f9af1d 100644 --- a/components/net/fetch/request.rs +++ b/components/net/fetch/request.rs @@ -10,7 +10,7 @@ use hyper::header::ContentType; use fetch::cors_cache::CORSCache; use fetch::response::Response; -/// A [request context](http://fetch.spec.whatwg.org/#concept-request-context) +/// A [request context](https://fetch.spec.whatwg.org/#concept-request-context) #[derive(Copy)] pub enum Context { Audio, Beacon, CSPreport, Download, Embed, Eventsource, @@ -20,7 +20,7 @@ pub enum Context { Style, Track, Video, Worker, XMLHttpRequest, XSLT } -/// A [request context frame type](http://fetch.spec.whatwg.org/#concept-request-context-frame-type) +/// A [request context frame type](https://fetch.spec.whatwg.org/#concept-request-context-frame-type) #[derive(Copy)] pub enum ContextFrameType { Auxiliary, @@ -29,14 +29,14 @@ pub enum ContextFrameType { ContextNone } -/// A [referer](http://fetch.spec.whatwg.org/#concept-request-referrer) +/// A [referer](https://fetch.spec.whatwg.org/#concept-request-referrer) pub enum Referer { RefererNone, Client, RefererUrl(Url) } -/// A [request mode](http://fetch.spec.whatwg.org/#concept-request-mode) +/// A [request mode](https://fetch.spec.whatwg.org/#concept-request-mode) #[derive(Copy)] pub enum RequestMode { SameOrigin, @@ -45,7 +45,7 @@ pub enum RequestMode { ForcedPreflightMode } -/// Request [credentials mode](http://fetch.spec.whatwg.org/#concept-request-credentials-mode) +/// Request [credentials mode](https://fetch.spec.whatwg.org/#concept-request-credentials-mode) #[derive(Copy)] pub enum CredentialsMode { Omit, @@ -53,7 +53,7 @@ pub enum CredentialsMode { Include } -/// [Response tainting](http://fetch.spec.whatwg.org/#concept-request-response-tainting) +/// [Response tainting](https://fetch.spec.whatwg.org/#concept-request-response-tainting) #[derive(Copy)] pub enum ResponseTainting { Basic, @@ -61,7 +61,7 @@ pub enum ResponseTainting { Opaque } -/// A [Request](http://fetch.spec.whatwg.org/#requests) as defined by the Fetch spec +/// A [Request](https://fetch.spec.whatwg.org/#requests) as defined by the Fetch spec pub struct Request { pub method: Method, pub url: Url, @@ -117,7 +117,7 @@ impl Request { } } - /// [Basic fetch](http://fetch.spec.whatwg.org#basic-fetch) + /// [Basic fetch](https://fetch.spec.whatwg.org#basic-fetch) pub fn basic_fetch(&mut self) -> Response { match &*self.url.scheme { "about" => match self.url.non_relative_scheme_data() { @@ -142,7 +142,7 @@ impl Request { } } - // [HTTP fetch](http://fetch.spec.whatwg.org#http-fetch) + // [HTTP fetch](https://fetch.spec.whatwg.org#http-fetch) pub fn http_fetch(&mut self, _cors_flag: bool, cors_preflight_flag: bool, _authentication_fetch_flag: bool) -> Response { let response = Response::new(); // TODO: Service worker fetch diff --git a/components/net/fetch/response.rs b/components/net/fetch/response.rs index 1db7dce330c..468d86abf39 100644 --- a/components/net/fetch/response.rs +++ b/components/net/fetch/response.rs @@ -8,7 +8,7 @@ use hyper::header::Headers; use std::ascii::AsciiExt; use std::sync::mpsc::Receiver; -/// [Response type](http://fetch.spec.whatwg.org/#concept-response-type) +/// [Response type](https://fetch.spec.whatwg.org/#concept-response-type) #[derive(Clone, PartialEq, Copy)] pub enum ResponseType { Basic, @@ -18,7 +18,7 @@ pub enum ResponseType { Opaque } -/// [Response termination reason](http://fetch.spec.whatwg.org/#concept-response-termination-reason) +/// [Response termination reason](https://fetch.spec.whatwg.org/#concept-response-termination-reason) #[derive(Clone, Copy)] pub enum TerminationReason { EndUserAbort, @@ -49,7 +49,7 @@ pub struct ResponseLoader { chan: Receiver<ResponseMsg> } -/// A [Response](http://fetch.spec.whatwg.org/#concept-response) as defined by the Fetch spec +/// A [Response](https://fetch.spec.whatwg.org/#concept-response) as defined by the Fetch spec #[derive(Clone)] pub struct Response { pub response_type: ResponseType, @@ -59,7 +59,7 @@ pub struct Response { pub status: Option<StatusCode>, pub headers: Headers, pub body: ResponseBody, - /// [Internal response](http://fetch.spec.whatwg.org/#concept-internal-response), only used if the Response is a filtered response + /// [Internal response](https://fetch.spec.whatwg.org/#concept-internal-response), only used if the Response is a filtered response pub internal_response: Option<Box<Response>>, } |