Auto merge of #5677 - frewsxcv:https, r=Ms2ger

Extracted this out of #5649

This commit was created with the following commands:

```
find . -iname "*.webidl" -type f -print0 | xargs -0 sed -i '' 's/http:\(.*\)whatwg.org/https:\1whatwg.org/g'
```

```
find . -iname "*.rs" -type f -print0 | xargs -0 sed -i '' 's/http:\(.*\)whatwg.org/https:\1whatwg.org/g'
```
This commit is contained in:
bors-servo 2015-04-14 02:57:41 -05:00
commit 4997d3a112
152 changed files with 378 additions and 378 deletions

View file

@ -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();

View file

@ -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

View file

@ -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>>,
}

View file

@ -250,7 +250,7 @@ reason: \"certificate verify failed\" }]";
if response.status.class() == StatusClass::Redirection {
match response.headers.get::<Location>() {
Some(&Location(ref new_url)) => {
// CORS (http://fetch.spec.whatwg.org/#http-fetch, status section, point 9, 10)
// CORS (https://fetch.spec.whatwg.org/#http-fetch, status section, point 9, 10)
match load_data.cors {
Some(ref c) => {
if c.preflight {

View file

@ -47,7 +47,7 @@ pub mod resource_task;
pub mod storage_task;
pub mod mime_classifier;
/// An implementation of the [Fetch spec](http://fetch.spec.whatwg.org/)
/// An implementation of the [Fetch spec](https://fetch.spec.whatwg.org/)
pub mod fetch {
#![allow(dead_code, unused)] // XXXManishearth this is only temporary until the Fetch mod starts being used
pub mod request;