Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions collector/src/framework/analyzers/http_decompressor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ impl HTTPDecompressor {
}

/// Keep the compressed data in the event (adds a compressed_body field)
#[allow(dead_code)]
pub fn keep_compressed(mut self) -> Self {
self.keep_compressed = true;
self
Expand Down
10 changes: 6 additions & 4 deletions collector/src/framework/analyzers/ssl_merger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,12 @@ impl SSLMerger {
return body.ends_with("0\r\n\r\n") || body.contains("\r\n0\r\n\r\n");
} else {
// For non-chunked, check Content-Length
if let Some(cl_start) = headers.to_lowercase().find("content-length:") {
let cl_line = &headers[cl_start..];
if let Some(cl_end) = cl_line.find("\r\n") {
let cl_value = &cl_line[15..cl_end].trim();
// Parse headers line-by-line to avoid false matches (e.g., X-Content-Length)
for line in headers.split("\r\n") {
let line_lower = line.to_lowercase();
if line_lower.starts_with("content-length:") {
let value_start = "content-length:".len();
let cl_value = line[value_start..].trim();
if let Ok(content_length) = cl_value.parse::<usize>() {
return body.len() >= content_length;
}
Expand Down
Loading