Skip to content

Commit

Permalink
decompressor: do not propagate error
Browse files Browse the repository at this point in the history
if there was a decompression error, we should still parse
the next response and request and not put the whole flow in
error state
  • Loading branch information
catenacyber committed Feb 27, 2025
1 parent c08cd0a commit 63e3c1a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions rust/htp/src/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1033,9 +1033,7 @@ impl ConnectionParser {
}
let mut decompressor = req.request_decompressor.take().ok_or(HtpStatus::ERROR)?;
if let Some(data) = data {
decompressor
.decompress(data)
.map_err(|_| HtpStatus::ERROR)?;
let _ = decompressor.decompress(data);
if decompressor.time_spent()
> self.cfg.compression_options.get_time_limit() as u64
{
Expand Down

0 comments on commit 63e3c1a

Please sign in to comment.