Update for latest rust

Tracks rust nightly.

7 tests fail -- still finding source
This commit is contained in:
cyderize
2015-01-10 18:37:10 +11:00
parent 241ebc1270
commit 122e94c8a6
42 changed files with 291 additions and 189 deletions

View File

@@ -35,16 +35,16 @@ impl Response {
Some(status) => status,
None => return Err(HttpStatusError)
};
debug!("{} {}", version, status);
debug!("{:?} {:?}", version, status);
let headers = try!(header::Headers::from_raw(&mut stream));
debug!("Headers: [\n{}]", headers);
debug!("Headers: [\n{:?}]", headers);
let body = if headers.has::<TransferEncoding>() {
match headers.get::<TransferEncoding>() {
Some(&TransferEncoding(ref codings)) => {
if codings.len() > 1 {
debug!("TODO: #2 handle other codings: {}", codings);
debug!("TODO: #2 handle other codings: {:?}", codings);
};
if codings.contains(&Chunked) {
@@ -88,7 +88,7 @@ impl Response {
impl Reader for Response {
#[inline]
fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
fn read(&mut self, buf: &mut [u8]) -> IoResult<usize> {
self.body.read(buf)
}
}