diff --git a/rust/htp/src/decompressors.rs b/rust/htp/src/decompressors.rs index 2bef7285633..f2f13217695 100644 --- a/rust/htp/src/decompressors.rs +++ b/rust/htp/src/decompressors.rs @@ -882,7 +882,7 @@ impl Write for InnerDecompressor { } _ => { let written = self.try_finish(&mut writer); - if written { + if written && self.restarts == 0 { // error, but some data has been written, stop here return Err(e); }