Merge pull request #165 from hyperium/expires

Adds CacheControl, Expires, and LastModified headers
This commit is contained in:
Sean McArthur
2014-12-02 21:22:32 -08:00
7 changed files with 309 additions and 44 deletions

View File

@@ -77,14 +77,13 @@ impl Header for TransferEncoding {
}
fn parse_header(raw: &[Vec<u8>]) -> Option<TransferEncoding> {
from_comma_delimited(raw).map(|vec| TransferEncoding(vec))
from_comma_delimited(raw).map(TransferEncoding)
}
}
impl HeaderFormat for TransferEncoding {
fn fmt_header(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
let TransferEncoding(ref parts) = *self;
fmt_comma_delimited(fmt, parts[])
fmt_comma_delimited(fmt, self[])
}
}