File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 11use bytes:: BytesMut ;
22use header_plz:: body_headers:: BodyHeader ;
3+ use header_plz:: body_headers:: content_encoding:: ContentEncoding ;
34use header_plz:: body_headers:: encoding_info:: EncodingInfo ;
45
56use crate :: decompression:: multi:: error:: MultiDecompressError ;
4849 . is_some ( )
4950 }
5051
52+ pub fn is_chunked_te_only ( & self ) -> bool {
53+ self . body_headers
54+ . as_ref ( )
55+ . and_then ( |bh| Some ( bh. is_chunked_te_only ( ) ) )
56+ . unwrap_or ( false )
57+ }
58+
59+ pub fn is_identity_te_only ( & self ) -> bool {
60+ self . body_headers
61+ . as_ref ( )
62+ . and_then ( |bh| Some ( bh. is_identity_te_only ( ) ) )
63+ . unwrap_or ( false )
64+ }
65+
66+ pub fn is_identity_ce_only ( & self ) -> bool {
67+ self . body_headers
68+ . as_ref ( )
69+ . and_then ( |bh| Some ( bh. is_identity_ce_only ( ) ) )
70+ . unwrap_or ( false )
71+ }
72+
5173 pub fn transfer_encoding ( & mut self ) -> Vec < EncodingInfo > {
5274 self . body_headers . as_mut ( ) . unwrap ( ) . transfer_encoding . take ( ) . unwrap ( )
5375 }
6082 self . extra_body . is_some ( )
6183 }
6284
85+ pub fn extra_body_is_none ( & self ) -> bool {
86+ self . extra_body . is_none ( )
87+ }
88+
6389 pub fn take_main_body ( & mut self ) -> BytesMut {
6490 self . body . split ( )
6591 }
You can’t perform that action at this time.
0 commit comments