diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
commit | 086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch) | |
tree | a4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /third_party/rust/neqo-http3/src/connection_client.rs | |
parent | Adding debian version 124.0.1-1. (diff) | |
download | firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/rust/neqo-http3/src/connection_client.rs')
-rw-r--r-- | third_party/rust/neqo-http3/src/connection_client.rs | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/third_party/rust/neqo-http3/src/connection_client.rs b/third_party/rust/neqo-http3/src/connection_client.rs index 5cc0541c0c..52572a760d 100644 --- a/third_party/rust/neqo-http3/src/connection_client.rs +++ b/third_party/rust/neqo-http3/src/connection_client.rs @@ -6,7 +6,6 @@ use std::{ cell::RefCell, - convert::TryFrom, fmt::{Debug, Display}, mem, net::SocketAddr, @@ -894,13 +893,6 @@ impl Http3Client { self.process_http3(now); } - /// This should not be used because it gives access to functionalities that may disrupt the - /// proper functioning of the HTTP/3 session. - /// Only used by `neqo-interop`. - pub fn conn(&mut self) -> &mut Connection { - &mut self.conn - } - /// Process HTTP3 layer. /// When `process_output`, `process_input`, or `process` is called we must call this function /// as well. The functions calls `Http3Client::check_connection_events` to handle events from @@ -943,12 +935,12 @@ impl Http3Client { /// returned. After that, the application should call the function again if a new UDP packet is /// received and processed or the timer value expires. /// - /// The HTTP/3 neqo implementation drives the HTTP/3 and QUC layers, therefore this function + /// The HTTP/3 neqo implementation drives the HTTP/3 and QUIC layers, therefore this function /// will call both layers: /// - First it calls HTTP/3 layer processing (`process_http3`) to make sure the layer writes /// data to QUIC layer or cancels streams if needed. /// - Then QUIC layer processing is called - [`Connection::process_output`][3]. This produces a - /// packet or a timer value. It may also produce ned [`ConnectionEvent`][2]s, e.g. connection + /// packet or a timer value. It may also produce new [`ConnectionEvent`][2]s, e.g. connection /// state-change event. /// - Therefore the HTTP/3 layer processing (`process_http3`) is called again. /// @@ -1296,7 +1288,7 @@ impl EventProvider for Http3Client { #[cfg(test)] mod tests { - use std::{convert::TryFrom, mem, time::Duration}; + use std::{mem, time::Duration}; use neqo_common::{event::Provider, qtrace, Datagram, Decoder, Encoder}; use neqo_crypto::{AllowZeroRtt, AntiReplay, ResumptionToken}; @@ -1306,8 +1298,9 @@ mod tests { StreamType, Version, RECV_BUFFER_SIZE, SEND_BUFFER_SIZE, }; use test_fixture::{ - addr, anti_replay, default_server_h3, fixture_init, new_server, now, - CountingConnectionIdGenerator, DEFAULT_ALPN_H3, DEFAULT_KEYS, DEFAULT_SERVER_NAME, + anti_replay, default_server_h3, fixture_init, new_server, now, + CountingConnectionIdGenerator, DEFAULT_ADDR, DEFAULT_ALPN_H3, DEFAULT_KEYS, + DEFAULT_SERVER_NAME, }; use super::{ @@ -1340,8 +1333,8 @@ mod tests { Http3Client::new( DEFAULT_SERVER_NAME, Rc::new(RefCell::new(CountingConnectionIdGenerator::default())), - addr(), - addr(), + DEFAULT_ADDR, + DEFAULT_ADDR, Http3Parameters::default() .connection_parameters( // Disable compatible upgrade, which complicates tests. @@ -1996,7 +1989,7 @@ mod tests { // The response header from PUSH_DATA (0x01, 0x06, 0x00, 0x00, 0xd9, 0x54, 0x01, 0x34) are // decoded into: fn check_push_response_header(header: &[Header]) { - let expected_push_response_header = vec![ + let expected_push_response_header = [ Header::new(":status", "200"), Header::new("content-length", "4"), ]; @@ -3952,7 +3945,7 @@ mod tests { ); } x => { - panic!("event {:?}", x); + panic!("event {x:?}"); } } @@ -3998,7 +3991,7 @@ mod tests { assert!(fin); } x => { - panic!("event {:?}", x); + panic!("event {x:?}"); } } // Stream should now be closed and gone @@ -4071,7 +4064,7 @@ mod tests { assert_eq!(stream_id, request_stream_id); } x => { - panic!("event {:?}", x); + panic!("event {x:?}"); } } } @@ -4135,7 +4128,7 @@ mod tests { assert!(!interim); recv_header = true; } else { - panic!("event {:?}", e); + panic!("event {e:?}"); } } assert!(recv_header); |