File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed
Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -325,19 +325,19 @@ where
325325 ) -> Result < Response < Incoming > , hyper:: Error > {
326326 match self {
327327 SendRequest :: Http1 ( sender) => {
328- if req. version ( ) == hyper:: Version :: HTTP_2 {
329- if let Some ( authority) = req. uri ( ) . authority ( ) . cloned ( ) {
330- match authority . as_str ( ) . parse :: < header :: HeaderValue > ( ) {
331- Ok ( host_value ) => {
332- req . headers_mut ( ) . insert ( header :: HOST , host_value) ;
333- }
334- Err ( err ) => {
335- tracing :: warn! (
336- "Failed to parse authority '{}' as HOST header: {}" ,
337- authority,
338- err
339- ) ;
340- }
328+ if req. version ( ) == hyper:: Version :: HTTP_2
329+ && let Some ( authority) = req. uri ( ) . authority ( ) . cloned ( )
330+ {
331+ match authority . as_str ( ) . parse :: < header :: HeaderValue > ( ) {
332+ Ok ( host_value) => {
333+ req . headers_mut ( ) . insert ( header :: HOST , host_value ) ;
334+ }
335+ Err ( err ) => {
336+ tracing :: warn! (
337+ "Failed to parse authority '{}' as HOST header: {}" ,
338+ authority ,
339+ err
340+ ) ;
341341 }
342342 }
343343 }
You can’t perform that action at this time.
0 commit comments