This commit is contained in:
Sean McArthur
2014-09-06 14:45:29 -07:00
parent 1926e82369
commit eaa3cb46ee
4 changed files with 10 additions and 5 deletions

View File

@@ -44,13 +44,13 @@ impl Request {
debug!("{}", headers);
// TODO: handle Transfer-Encoding
let body = if headers.has::<ContentLength>() {
match headers.get_ref::<ContentLength>() {
Some(&ContentLength(len)) => SizedReader(tcp, len),
None => unreachable!()
}
} else {
todo!("check for Transfer-Encoding: chunked");
ChunkedReader(tcp, None)
};