adds HttpWriters

This commit is contained in:
Sean McArthur
2014-09-17 17:19:07 -07:00
parent b9ea1fd9b8
commit 1c472a220a
6 changed files with 190 additions and 21 deletions

View File

@@ -1,5 +1,6 @@
use header::Header;
use std::fmt::{mod, Show};
use header::Header;
use super::from_one_raw_str;
/// The `Content-Length` header.
@@ -23,3 +24,11 @@ impl Header for ContentLength {
}
}
impl ContentLength {
/// Returns the wrapped length.
#[inline]
pub fn len(&self) -> uint {
let ContentLength(len) = *self;
len
}
}

View File

@@ -33,7 +33,6 @@ pub enum Encoding {
/// The `chunked` encoding.
Chunked,
// TODO: #2 implement this in `HttpReader`.
/// The `gzip` encoding.
Gzip,
/// The `deflate` encoding.