Merge pull request #143 from cybergeek94/master

Compile error and ChunkedReader bugfix
This commit is contained in:
Jonathan Reem
2014-11-24 03:14:06 -08:00
2 changed files with 3 additions and 1 deletions

View File

@@ -432,7 +432,7 @@ pub struct HeaderFormatter<H: HeaderFormat>(H);
impl<H: HeaderFormat> Show for HeaderFormatter<H> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
self.fmt_header(f)
self.0.fmt_header(f)
}
}

View File

@@ -82,6 +82,8 @@ impl<R: Reader> Reader for HttpReader<R> {
debug!("Chunked read, remaining={}", rem);
if rem == 0 {
*opt_remaining = Some(0);
// chunk of size 0 signals the end of the chunked stream
// if the 0 digit was missing from the stream, it would
// be an InvalidInput error instead.