File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 11use crate :: decompression:: {
22 dstruct:: DecompressionStruct , multi:: error:: MultiDecompressError ,
33} ;
4- use bytes:: { BufMut , BytesMut , buf:: Writer } ;
4+ use bytes:: { buf:: Writer , BufMut , BytesMut } ;
55use header_plz:: body_headers:: encoding_info:: EncodingInfo ;
66use tracing:: error;
77
Original file line number Diff line number Diff line change 11use std:: cmp:: Ordering ;
22
3+ use body_plz:: variants:: Body ;
34use bytes:: BytesMut ;
45use header_plz:: body_headers:: encoding_info:: EncodingInfo ;
56use tracing:: error;
67
78use crate :: {
8- content_length:: add_body_and_update_cl,
99 decode_struct:: DecodeStruct ,
1010 decompress_trait:: DecompressTrait ,
1111 decompression:: {
@@ -26,7 +26,7 @@ pub enum DecodeState<'a, T> {
2626
2727impl < ' a , T > DecodeState < ' a , T >
2828where
29- T : DecompressTrait + ' a ,
29+ T : DecompressTrait + ' a + std :: fmt :: Debug ,
3030{
3131 pub fn init ( message : & ' a mut T , buf : & ' a mut BytesMut ) -> Self {
3232 let decode_struct = DecodeStruct :: new ( message, buf) ;
4545 } else if decode_struct. extra_body_is_some ( ) {
4646 Self :: UpdateContentLength ( decode_struct)
4747 } else {
48+ if decode_struct. extra_body_is_none ( ) {
49+ let mut body = decode_struct. take_main_body ( ) ;
50+ decode_struct. message . set_body ( Body :: Raw ( body) ) ;
51+ } else {
52+ decode_struct. add_body_and_update_cl ( ) ;
53+ }
4854 Self :: End
4955 } ;
5056 Ok ( next_state)
You can’t perform that action at this time.
0 commit comments