diff --git a/src/http.rs b/src/http.rs index 1651c9ae..bc599e2e 100644 --- a/src/http.rs +++ b/src/http.rs @@ -82,6 +82,8 @@ impl Reader for HttpReader { 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.