File tree Expand file tree Collapse file tree 2 files changed +2
-35
lines changed Expand file tree Collapse file tree 2 files changed +2
-35
lines changed Original file line number Diff line number Diff line change @@ -1393,14 +1393,8 @@ impl proto::Peer for Peer {
13931393 // A request translated from HTTP/1 must not include the :authority
13941394 // header
13951395 if let Some ( authority) = pseudo. authority {
1396- let maybe_authority = uri:: Authority :: from_maybe_shared ( authority. clone ( ) . into_inner ( ) ) ;
1397- parts. authority = Some ( maybe_authority. or_else ( |why| {
1398- malformed ! (
1399- "malformed headers: malformed authority ({:?}): {}" ,
1400- authority,
1401- why,
1402- )
1403- } ) ?) ;
1396+ parts. authority =
1397+ uri:: Authority :: from_maybe_shared ( authority. clone ( ) . into_inner ( ) ) . ok ( ) ;
14041398 }
14051399
14061400 // A :scheme is required, except CONNECT.
Original file line number Diff line number Diff line change @@ -441,33 +441,6 @@ async fn push_request_between_data() {
441441#[ ignore]
442442fn accept_with_pending_connections_after_socket_close ( ) { }
443443
444- #[ tokio:: test]
445- async fn recv_invalid_authority ( ) {
446- h2_support:: trace_init!( ) ;
447- let ( io, mut client) = mock:: new ( ) ;
448-
449- let bad_auth = util:: byte_str ( "not:a/good authority" ) ;
450- let mut bad_headers: frame:: Headers = frames:: headers ( 1 )
451- . request ( "GET" , "https://example.com/" )
452- . eos ( )
453- . into ( ) ;
454- bad_headers. pseudo_mut ( ) . authority = Some ( bad_auth) ;
455-
456- let client = async move {
457- let settings = client. assert_server_handshake ( ) . await ;
458- assert_default_settings ! ( settings) ;
459- client. send_frame ( bad_headers) . await ;
460- client. recv_frame ( frames:: reset ( 1 ) . protocol_error ( ) ) . await ;
461- } ;
462-
463- let srv = async move {
464- let mut srv = server:: handshake ( io) . await . expect ( "handshake" ) ;
465- assert ! ( srv. next( ) . await . is_none( ) ) ;
466- } ;
467-
468- join ( client, srv) . await ;
469- }
470-
471444#[ tokio:: test]
472445async fn recv_connection_header ( ) {
473446 h2_support:: trace_init!( ) ;
You can’t perform that action at this time.
0 commit comments