Skip to content

Commit

Permalink
Add state string to http event structure
Browse files Browse the repository at this point in the history
  • Loading branch information
jknpark committed Jan 4, 2024
1 parent a616037 commit 9137cdc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ingest/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,14 @@ pub struct Http {
pub resp_filenames: Vec<String>,
pub resp_mime_types: Vec<String>,
pub post_body: Vec<u8>,
pub state: String,
}

impl Display for Http {
fn fmt(&self, f: &mut Formatter) -> std::fmt::Result {
write!(
f,
"{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}",
"{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}",
self.orig_addr,
self.orig_port,
self.resp_addr,
Expand Down Expand Up @@ -276,7 +277,8 @@ impl Display for Http {
String::from("-")
} else {
std::str::from_utf8(self.post_body.as_slice()).unwrap_or_default().replace('\t', " ")
}
},
as_str_or_default(&self.state),
)
}
}
Expand Down

0 comments on commit 9137cdc

Please sign in to comment.