diff --git a/Cargo.lock b/Cargo.lock index 4fb9127..512dac4 100755 --- a/Cargo.lock +++ b/Cargo.lock @@ -338,7 +338,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "fht2p" -version = "0.9.0" +version = "0.9.1" dependencies = [ "anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", "askama 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index 157fa34..d3323f3 100755 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fht2p" -version = "0.9.0" # alpha"] description = "A HTTP Server for Static File written with Rust" build = "build.rs" diff --git a/src/handlers/file_upload/multipart.rs b/src/handlers/file_upload/multipart.rs index 29e88ba..1ad7e28 100644 --- a/src/handlers/file_upload/multipart.rs +++ b/src/handlers/file_upload/multipart.rs @@ -311,7 +311,7 @@ impl<'a> Part<'a> { let res = match parse_part_eof(chunk.as_ref(), &self.multi.boundary) { None => Some(Ok(chunk)), Some(None) => { - if self.complete { + if self.multi.eof { return Some(Err(format_err!("unexpected eof"))); } else { // todo: it maybe slow ?