Commit
+12 -0 +/-1 browse
1 | diff --git a/src/common/message.rs b/src/common/message.rs |
2 | index b5a33c1..7575405 100644 |
3 | --- a/src/common/message.rs |
4 | +++ b/src/common/message.rs |
5 | @@ -198,10 +198,22 @@ impl<'x> AuthenticatedMessage<'x> { |
6 | self.date_header_present |
7 | } |
8 | |
9 | + pub fn raw_message(&self) -> &[u8] { |
10 | + self.raw_message |
11 | + } |
12 | + |
13 | pub fn raw_headers(&self) -> &[u8] { |
14 | self.raw_message.get(..self.body_offset).unwrap_or_default() |
15 | } |
16 | |
17 | + pub fn raw_parsed_headers(&self) -> &[(&[u8], &[u8])] { |
18 | + &self.headers |
19 | + } |
20 | + |
21 | + pub fn raw_body(&self) -> &[u8] { |
22 | + self.raw_message.get(self.body_offset..).unwrap_or_default() |
23 | + } |
24 | + |
25 | pub fn body_offset(&self) -> usize { |
26 | self.body_offset |
27 | } |