http1: only disable decompression after too many bombs

Ticket: 9200

And to do so, reinit the content_encoding, so that
we do not try to take a decompressor
pull/16467/head
Philippe Antoine 2 weeks ago committed by Victor Julien
parent b717c481d3
commit 37cc354809

@ -1253,6 +1253,9 @@ impl ConnectionParser {
let compression_options = self.cfg.compression_options;
if self.bombs >= compression_options.get_max_bombs() {
// skip decompression for this flow if too many bombs were seen
self.request_mut()
.unwrap()
.request_content_encoding_processing = HtpContentEncoding::None;
return Ok(());
}
if encoding != HtpContentEncoding::None {

@ -1337,6 +1337,9 @@ impl ConnectionParser {
let compression_options = self.cfg.compression_options;
if self.bombs >= compression_options.get_max_bombs() {
// skip decompression for this flow if too many bombs were seen
self.response_mut()
.unwrap()
.response_content_encoding_processing = HtpContentEncoding::None;
return Ok(());
}
if encoding != HtpContentEncoding::None {

Loading…
Cancel
Save