diff options
author | Josh Matthews <josh@joshmatthews.net> | 2015-01-15 13:26:44 -0500 |
---|---|---|
committer | Glenn Watson <gw@intuitionlibrary.com> | 2015-01-28 10:16:49 +1000 |
commit | 95fc29fa0db21959df99d81cdbb9561226321d2f (patch) | |
tree | a48e171165ec155062ef13c550b2c0f72d127425 /components/net/fetch/response.rs | |
parent | ff8cbff81016c157373c1675f3eee69dd70ae544 (diff) | |
download | servo-95fc29fa0db21959df99d81cdbb9561226321d2f.tar.gz servo-95fc29fa0db21959df99d81cdbb9561226321d2f.zip |
Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev.
Diffstat (limited to 'components/net/fetch/response.rs')
-rw-r--r-- | components/net/fetch/response.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/components/net/fetch/response.rs b/components/net/fetch/response.rs index 2c1817de338..7380f3e7ad6 100644 --- a/components/net/fetch/response.rs +++ b/components/net/fetch/response.rs @@ -6,10 +6,10 @@ use url::Url; use hyper::status::StatusCode; use hyper::header::Headers; use std::ascii::AsciiExt; -use std::comm::Receiver; +use std::sync::mpsc::Receiver; /// [Response type](http://fetch.spec.whatwg.org/#concept-response-type) -#[deriving(Clone, PartialEq, Copy)] +#[derive(Clone, PartialEq, Copy)] pub enum ResponseType { Basic, CORS, @@ -19,7 +19,7 @@ pub enum ResponseType { } /// [Response termination reason](http://fetch.spec.whatwg.org/#concept-response-termination-reason) -#[deriving(Clone, Copy)] +#[derive(Clone, Copy)] pub enum TerminationReason { EndUserAbort, Fatal, @@ -29,7 +29,7 @@ pub enum TerminationReason { /// The response body can still be pushed to after fetch /// This provides a way to store unfinished response bodies #[unstable = "I haven't yet decided exactly how the interface for this will be"] -#[deriving(Clone)] +#[derive(Clone)] pub enum ResponseBody { Empty, // XXXManishearth is this necessary, or is Done(vec![]) enough? Receiving(Vec<u8>), @@ -50,7 +50,7 @@ pub struct ResponseLoader { } /// A [Response](http://fetch.spec.whatwg.org/#concept-response) as defined by the Fetch spec -#[deriving(Clone)] +#[derive(Clone)] pub struct Response { pub response_type: ResponseType, pub termination_reason: Option<TerminationReason>, @@ -110,7 +110,7 @@ impl Response { ResponseType::Default | ResponseType::Error => unreachable!(), ResponseType::Basic => { let headers = old_headers.iter().filter(|header| { - match header.name().to_ascii_lower().as_slice() { + match header.name().to_ascii_lowercase().as_slice() { "set-cookie" | "set-cookie2" => false, _ => true } @@ -120,7 +120,7 @@ impl Response { }, ResponseType::CORS => { let headers = old_headers.iter().filter(|header| { - match header.name().to_ascii_lower().as_slice() { + match header.name().to_ascii_lowercase().as_slice() { "cache-control" | "content-language" | "content-type" | "expires" | "last-modified" | "Pragma" => false, // XXXManishearth handle Access-Control-Expose-Headers |