aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/xmlhttprequest.rs
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2015-01-31 14:36:05 +0100
committerMatt Brubeck <mbrubeck@limpet.net>2015-02-11 14:48:34 -0800
commitd5dd1d658e5d79701fb9d028479a0fcb26a033fa (patch)
tree0c243afe9d7d82695d16bd43d72e88600e4414ef /components/script/dom/xmlhttprequest.rs
parentbc6882bdefc318402a46ede1494eb79339705c21 (diff)
downloadservo-d5dd1d658e5d79701fb9d028479a0fcb26a033fa.tar.gz
servo-d5dd1d658e5d79701fb9d028479a0fcb26a033fa.zip
Upgrade to rustc ba2f13ef0 2015-02-04
Diffstat (limited to 'components/script/dom/xmlhttprequest.rs')
-rw-r--r--components/script/dom/xmlhttprequest.rs15
1 files changed, 7 insertions, 8 deletions
diff --git a/components/script/dom/xmlhttprequest.rs b/components/script/dom/xmlhttprequest.rs
index f9f75fbbf7e..5bef26a7c84 100644
--- a/components/script/dom/xmlhttprequest.rs
+++ b/components/script/dom/xmlhttprequest.rs
@@ -33,8 +33,7 @@ use encoding::label::encoding_from_whatwg_label;
use encoding::types::{DecoderTrap, Encoding, EncodingRef, EncoderTrap};
use hyper::header::Headers;
-use hyper::header::common::{Accept, ContentLength, ContentType};
-use hyper::header::quality_item::QualityItem;
+use hyper::header::{Accept, ContentLength, ContentType, QualityItem};
use hyper::http::RawStatus;
use hyper::mime::{self, Mime};
use hyper::method::Method;
@@ -55,7 +54,7 @@ use std::borrow::ToOwned;
use std::cell::Cell;
use std::sync::mpsc::{Sender, Receiver, channel};
use std::default::Default;
-use std::io::Timer;
+use std::old_io::Timer;
use std::str::FromStr;
use std::time::duration::Duration;
use time;
@@ -361,8 +360,8 @@ impl<'a> XMLHttpRequestMethods for JSRef<'a, XMLHttpRequest> {
match upper.as_slice() {
"DELETE" | "GET" | "HEAD" | "OPTIONS" |
"POST" | "PUT" | "CONNECT" | "TRACE" |
- "TRACK" => upper.parse(),
- _ => s.parse()
+ "TRACK" => upper.parse().ok(),
+ _ => s.parse().ok()
}
});
// Step 2
@@ -830,7 +829,7 @@ impl<'a> PrivateXMLHttpRequestHelpers for JSRef<'a, XMLHttpRequest> {
// Substep 2
status.map(|RawStatus(code, reason)| {
self.status.set(code);
- *self.status_text.borrow_mut() = ByteString::new(reason.into_bytes());
+ *self.status_text.borrow_mut() = ByteString::new(reason.into_owned().into_bytes());
});
headers.as_ref().map(|h| *self.response_headers.borrow_mut() = h.clone());
@@ -990,13 +989,13 @@ impl<'a> PrivateXMLHttpRequestHelpers for JSRef<'a, XMLHttpRequest> {
// http://fetch.spec.whatwg.org/#concept-response-header-list
use std::fmt;
use hyper::header::{Header, HeaderFormat};
- use hyper::header::common::SetCookie;
+ use hyper::header::SetCookie;
// a dummy header so we can use headers.remove::<SetCookie2>()
#[derive(Clone)]
struct SetCookie2;
impl Header for SetCookie2 {
- fn header_name(_: Option<SetCookie2>) -> &'static str {
+ fn header_name() -> &'static str {
"set-cookie2"
}