aboutsummaryrefslogtreecommitdiffstats
path: root/components/net
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2015-01-02 12:45:28 +0100
committerJosh Matthews <josh@joshmatthews.net>2015-01-08 09:58:46 -0500
commit16c7060bc8ff91527ae97f8a3feee5706747b9c5 (patch)
tree0cc29f2cc50c729d3a8f9521a22991fad67b9afd /components/net
parentcf616b90a236f88058dbad74b568b4d4379d2829 (diff)
downloadservo-16c7060bc8ff91527ae97f8a3feee5706747b9c5.tar.gz
servo-16c7060bc8ff91527ae97f8a3feee5706747b9c5.zip
Update rustc to revision 2cfb5acb5a2751c759627377e602bac4f88f2d19.
Diffstat (limited to 'components/net')
-rw-r--r--components/net/about_loader.rs3
-rw-r--r--components/net/fetch/request.rs5
-rw-r--r--components/net/fetch/response.rs4
-rw-r--r--components/net/http_loader.rs2
-rw-r--r--components/net/image/holder.rs2
-rw-r--r--components/net/image_cache_task.rs2
-rw-r--r--components/net/lib.rs1
-rw-r--r--components/net/resource_task.rs4
8 files changed, 13 insertions, 10 deletions
diff --git a/components/net/about_loader.rs b/components/net/about_loader.rs
index 0a5f2c30ada..bedb21b573e 100644
--- a/components/net/about_loader.rs
+++ b/components/net/about_loader.rs
@@ -11,7 +11,6 @@ use hyper::http::RawStatus;
use servo_util::resource_files::resources_dir_path;
use std::io::fs::PathExtensions;
-use std::str::Slice;
pub fn factory(mut load_data: LoadData, start_chan: Sender<TargetedLoadResponse>) {
let senders = ResponseSenders {
@@ -25,7 +24,7 @@ pub fn factory(mut load_data: LoadData, start_chan: Sender<TargetedLoadResponse>
content_type: Some(("text".to_string(), "html".to_string())),
charset: Some("utf-8".to_string()),
headers: None,
- status: Some(RawStatus(200, Slice("OK")))
+ status: Some(RawStatus(200, "OK".into_string()))
});
chan.send(Done(Ok(())));
return
diff --git a/components/net/fetch/request.rs b/components/net/fetch/request.rs
index f4dd62971f8..050ed9b892b 100644
--- a/components/net/fetch/request.rs
+++ b/components/net/fetch/request.rs
@@ -11,6 +11,7 @@ use fetch::cors_cache::CORSCache;
use fetch::response::Response;
/// A [request context](http://fetch.spec.whatwg.org/#concept-request-context)
+#[deriving(Copy)]
pub enum Context {
Audio, Beacon, CSPreport, Download, Embed, Eventsource,
Favicon, Fetch, Font, Form, Frame, Hyperlink, IFrame, Image,
@@ -20,6 +21,7 @@ pub enum Context {
}
/// A [request context frame type](http://fetch.spec.whatwg.org/#concept-request-context-frame-type)
+#[deriving(Copy)]
pub enum ContextFrameType {
Auxiliary,
TopLevel,
@@ -35,6 +37,7 @@ pub enum Referer {
}
/// A [request mode](http://fetch.spec.whatwg.org/#concept-request-mode)
+#[deriving(Copy)]
pub enum RequestMode {
SameOrigin,
NoCORS,
@@ -43,6 +46,7 @@ pub enum RequestMode {
}
/// Request [credentials mode](http://fetch.spec.whatwg.org/#concept-request-credentials-mode)
+#[deriving(Copy)]
pub enum CredentialsMode {
Omit,
CredentialsSameOrigin,
@@ -50,6 +54,7 @@ pub enum CredentialsMode {
}
/// [Response tainting](http://fetch.spec.whatwg.org/#concept-request-response-tainting)
+#[deriving(Copy)]
pub enum ResponseTainting {
Basic,
CORSTainting,
diff --git a/components/net/fetch/response.rs b/components/net/fetch/response.rs
index f2ee213560d..2c1817de338 100644
--- a/components/net/fetch/response.rs
+++ b/components/net/fetch/response.rs
@@ -9,7 +9,7 @@ use std::ascii::AsciiExt;
use std::comm::Receiver;
/// [Response type](http://fetch.spec.whatwg.org/#concept-response-type)
-#[deriving(Clone, PartialEq)]
+#[deriving(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)]
+#[deriving(Clone, Copy)]
pub enum TerminationReason {
EndUserAbort,
Fatal,
diff --git a/components/net/http_loader.rs b/components/net/http_loader.rs
index ccfca4deb26..d8b909f88f3 100644
--- a/components/net/http_loader.rs
+++ b/components/net/http_loader.rs
@@ -85,7 +85,7 @@ fn load(load_data: LoadData, start_chan: Sender<TargetedLoadResponse>) {
// FIXME(seanmonstar): use AcceptEncoding from Hyper once available
//if !req.headers.has::<AcceptEncoding>() {
// We currently don't support HTTP Compression (FIXME #2587)
- req.headers_mut().set_raw("Accept-Encoding", vec![b"identity".to_vec()]);
+ req.headers_mut().set_raw("Accept-Encoding".into_string(), vec![b"identity".to_vec()]);
//}
let writer = match load_data.data {
Some(ref data) => {
diff --git a/components/net/image/holder.rs b/components/net/image/holder.rs
index 2ca86d8af99..216f362328a 100644
--- a/components/net/image/holder.rs
+++ b/components/net/image/holder.rs
@@ -7,7 +7,7 @@ use image_cache_task::ImageResponseMsg;
use local_image_cache::LocalImageCache;
use geom::size::Size2D;
-use sync::{Arc, Mutex};
+use std::sync::{Arc, Mutex};
use url::Url;
// FIXME: Nasty coupling here This will be a problem if we want to factor out image handling from
diff --git a/components/net/image_cache_task.rs b/components/net/image_cache_task.rs
index aa0097cd86b..46f238b0a00 100644
--- a/components/net/image_cache_task.rs
+++ b/components/net/image_cache_task.rs
@@ -13,7 +13,7 @@ use std::comm::{channel, Receiver, Sender};
use std::collections::HashMap;
use std::collections::hash_map::{Occupied, Vacant};
use std::mem::replace;
-use sync::{Arc, Mutex};
+use std::sync::{Arc, Mutex};
use serialize::{Encoder, Encodable};
use url::Url;
diff --git a/components/net/lib.rs b/components/net/lib.rs
index 1954802b2aa..0b579dd5e0d 100644
--- a/components/net/lib.rs
+++ b/components/net/lib.rs
@@ -16,7 +16,6 @@ extern crate log;
extern crate serialize;
extern crate "util" as servo_util;
extern crate stb_image;
-extern crate sync;
extern crate time;
extern crate url;
diff --git a/components/net/resource_task.rs b/components/net/resource_task.rs
index d7bd8f2e40f..9b541455a03 100644
--- a/components/net/resource_task.rs
+++ b/components/net/resource_task.rs
@@ -21,7 +21,6 @@ use hyper::mime::{Mime, Attr};
use url::Url;
use std::comm::{channel, Receiver, Sender};
-use std::str::Slice;
pub enum ControlMsg {
/// Request the data associated with a particular URL
@@ -86,7 +85,8 @@ impl Metadata {
content_type: None,
charset: None,
headers: None,
- status: Some(RawStatus(200, Slice("OK"))) // http://fetch.spec.whatwg.org/#concept-response-status-message
+ // http://fetch.spec.whatwg.org/#concept-response-status-message
+ status: Some(RawStatus(200, "OK".into_string()))
}
}