File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,8 +70,13 @@ impl<S> Layer<S> for DecompressionLayer {
7070
7171 #[ inline( always) ]
7272 fn layer ( & self , service : S ) -> Self :: Service {
73+ let decoder = decompression:: Decompression :: new ( service)
74+ . no_br ( )
75+ . no_deflate ( )
76+ . no_gzip ( )
77+ . no_zstd ( ) ;
7378 Decompression ( Some ( Decompression :: < S > :: accept_in_place (
74- decompression :: Decompression :: new ( service ) ,
79+ decoder ,
7580 & self . accept ,
7681 ) ) )
7782 }
@@ -126,10 +131,10 @@ where
126131 }
127132
128133 fn call ( & mut self , req : Request < ReqBody > ) -> Self :: Future {
129- if let Some ( accept ) = RequestConfig :: < AcceptEncoding > :: get ( req. extensions ( ) ) {
134+ if let Some ( accept_encoding ) = RequestConfig :: < AcceptEncoding > :: get ( req. extensions ( ) ) {
130135 if let Some ( decoder) = self . 0 . take ( ) {
131136 self . 0
132- . replace ( Decompression :: accept_in_place ( decoder, accept ) ) ;
137+ . replace ( Decompression :: accept_in_place ( decoder, accept_encoding ) ) ;
133138 }
134139 debug_assert ! ( self . 0 . is_some( ) ) ;
135140 }
You can’t perform that action at this time.
0 commit comments