diff --git a/CHANGELOG.md b/CHANGELOG.md index 51b6720..20653a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ file is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Changed + +- Remove `post_body` field in `Http` + ## [0.15.2+tis.0.0.1] - 2024-01-08 ### Added @@ -224,6 +230,7 @@ Versioning](https://semver.org/spec/v2.0.0.html). - Move from giganto +[Unreleased]: https://github.com/aicers/giganto-client/compare/0.15.2+tis.0.0.1...tis [0.15.2+tis.0.0.1]: https://github.com/aicers/giganto-client/compare/0.15.1...0.15.2+tis.0.0.1 [0.15.2]: https://github.com/aicers/giganto-client/compare/0.15.1...0.15.2 [0.15.1]: https://github.com/aicers/giganto-client/compare/0.15.0...0.15.1 diff --git a/README.md b/README.md index ad99596..f246ca6 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ for data processing and high-speed data transfer. ## License -Copyright 2022-2023 ClumL Inc. +Copyright 2022-2023 ClumL, Inc. Licensed under [Apache License, Version 2.0][apache-license] (the "License"); you may not use this crate except in compliance with the License. diff --git a/src/ingest.rs b/src/ingest.rs index 73b9967..b4742d9 100644 --- a/src/ingest.rs +++ b/src/ingest.rs @@ -195,7 +195,7 @@ mod tests { let nsec = 123; let ndt = NaiveDateTime::from_timestamp_opt(sec, nsec).unwrap(); - let ts = ndt.timestamp_nanos(); + let ts = ndt.timestamp_nanos_opt().unwrap(); let ts_fmt = super::convert_time_format(ts); assert_eq!(ts_fmt, "2.000000123"); @@ -203,7 +203,7 @@ mod tests { let nsec = 0; let ndt = NaiveDateTime::from_timestamp_opt(sec, nsec).unwrap(); - let ts = ndt.timestamp_nanos(); + let ts = ndt.timestamp_nanos_opt().unwrap(); let ts_fmt = super::convert_time_format(ts); assert_eq!(ts_fmt, "-1.000000000"); } diff --git a/src/ingest/network.rs b/src/ingest/network.rs index 0baf71e..a8df419 100644 --- a/src/ingest/network.rs +++ b/src/ingest/network.rs @@ -238,14 +238,13 @@ pub struct Http { pub orig_mime_types: Vec, pub resp_filenames: Vec, pub resp_mime_types: Vec, - pub post_body: Vec, } 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{}", self.orig_addr, self.orig_port, self.resp_addr, @@ -272,11 +271,6 @@ impl Display for Http { vec_to_string_or_default(&self.orig_mime_types), vec_to_string_or_default(&self.resp_filenames), vec_to_string_or_default(&self.resp_mime_types), - if self.post_body.is_empty() { - String::from("-") - } else { - std::str::from_utf8(self.post_body.as_slice()).unwrap_or_default().replace('\t', " ") - } ) } } diff --git a/src/publish.rs b/src/publish.rs index 3760e4f..336e0dc 100644 --- a/src/publish.rs +++ b/src/publish.rs @@ -700,7 +700,6 @@ mod tests { orig_mime_types: Vec::new(), resp_filenames: Vec::new(), resp_mime_types: Vec::new(), - post_body: Vec::new(), }; let raw_event = bincode::serialize(&http).unwrap(); let source = bincode::serialize(&"hello").unwrap();