Parse Transfer Encodings that we don't handle

We should not throw away information here, as downstream users
may want to handle alternative encodings.
This commit is contained in:
Jonathan Reem
2014-09-09 14:38:38 -07:00
parent a8d7b681da
commit d11f1d5a4d

View File

@@ -48,7 +48,10 @@ impl FromStr for Encoding {
fn from_str(s: &str) -> Option<Encoding> { fn from_str(s: &str) -> Option<Encoding> {
match s { match s {
"chunked" => Some(Chunked), "chunked" => Some(Chunked),
_ => None "deflate" => Some(Deflate),
"gzip" => Some(Gzip),
"compress" => Some(Compress),
_ => Some(EncodingExt(s.to_string()))
} }
} }
} }