mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Upgrade to rustc ba2f13ef0 2015-02-04
This commit is contained in:
parent
bc6882bdef
commit
d5dd1d658e
136 changed files with 1091 additions and 878 deletions
|
@ -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"
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue