summaryrefslogtreecommitdiffstats
path: root/third_party/rust/neqo-http3
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/rust/neqo-http3')
-rw-r--r--third_party/rust/neqo-http3/.cargo-checksum.json2
-rw-r--r--third_party/rust/neqo-http3/Cargo.toml45
-rw-r--r--third_party/rust/neqo-http3/src/client_events.rs6
-rw-r--r--third_party/rust/neqo-http3/src/connection.rs3
-rw-r--r--third_party/rust/neqo-http3/src/connection_client.rs33
-rw-r--r--third_party/rust/neqo-http3/src/control_stream_local.rs5
-rw-r--r--third_party/rust/neqo-http3/src/features/extended_connect/tests/webtransport/datagrams.rs2
-rw-r--r--third_party/rust/neqo-http3/src/features/extended_connect/tests/webtransport/mod.rs6
-rw-r--r--third_party/rust/neqo-http3/src/features/extended_connect/webtransport_session.rs20
-rw-r--r--third_party/rust/neqo-http3/src/features/extended_connect/webtransport_streams.rs10
-rw-r--r--third_party/rust/neqo-http3/src/frames/hframe.rs7
-rw-r--r--third_party/rust/neqo-http3/src/frames/reader.rs2
-rw-r--r--third_party/rust/neqo-http3/src/frames/wtframe.rs2
-rw-r--r--third_party/rust/neqo-http3/src/headers_checks.rs2
-rw-r--r--third_party/rust/neqo-http3/src/lib.rs29
-rw-r--r--third_party/rust/neqo-http3/src/priority.rs8
-rw-r--r--third_party/rust/neqo-http3/src/push_controller.rs2
-rw-r--r--third_party/rust/neqo-http3/src/qlog.rs7
-rw-r--r--third_party/rust/neqo-http3/src/recv_message.rs8
-rw-r--r--third_party/rust/neqo-http3/src/send_message.rs18
-rw-r--r--third_party/rust/neqo-http3/src/server.rs6
-rw-r--r--third_party/rust/neqo-http3/src/server_events.rs1
-rw-r--r--third_party/rust/neqo-http3/tests/priority.rs6
-rw-r--r--third_party/rust/neqo-http3/tests/send_message.rs31
-rw-r--r--third_party/rust/neqo-http3/tests/webtransport.rs6
25 files changed, 103 insertions, 164 deletions
diff --git a/third_party/rust/neqo-http3/.cargo-checksum.json b/third_party/rust/neqo-http3/.cargo-checksum.json
index 2705291744..0459fea7cc 100644
--- a/third_party/rust/neqo-http3/.cargo-checksum.json
+++ b/third_party/rust/neqo-http3/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"Cargo.toml":"fe3c1114cfbb94004bf56740c0d373568cb459efdb12504e67f31923fbd436e1","src/buffered_send_stream.rs":"f45bdf9ad2a04b3828c74ff5440681d3c9d1af39b55470e4f729842dc2412295","src/client_events.rs":"e1392e7bbb62fb0505a4d8bcd27559699bbf38f3c94e7d8cae7291db82e6334c","src/conn_params.rs":"224a8ea6ef632930a7788a1cabf47ce69ad41bd4bc8dcf3053fbd998fdb38e82","src/connection.rs":"09aeb123f8dc6b903dd7d30579e5bb09ed8f70bfae563fb2fcc1871c67d604d4","src/connection_client.rs":"ed1c9ebf443f49dbf12c193953a71ec0e6b95555e1927afce813d2a8324758be","src/connection_server.rs":"ca33b50650bd1ca2a952851b72712d55ec2e48b48f1f06e4184c808b8e1e009a","src/control_stream_local.rs":"d6ecc0adc926e1d5cec9a378317f9dfcfeeb9840a0873a2afb380c2d252d8c54","src/control_stream_remote.rs":"59eb4041e366d92f9f294e8446755caa5e91fd943bba7b79b726698ba13be248","src/features/extended_connect/mod.rs":"3b02f6b18627f3855465a81b1d9b285e6f13839e75a8a6db648ed9082908d7f0","src/features/extended_connect/tests/mod.rs":"fd6aee37243713e80fc526552f21f0222338cec9890409b6575a2a637b17ec1f","src/features/extended_connect/tests/webtransport/datagrams.rs":"7e3bdd591b9c7d02f69954629f889d52bd54f13dbca11d555e614138c2a55107","src/features/extended_connect/tests/webtransport/mod.rs":"fed03f0ded21a9f17be5be99e4572e16dd0c8598e37044df3228990ea7fcc9f4","src/features/extended_connect/tests/webtransport/negotiation.rs":"98254ef8446581ec520026b04ef9549645602181b61602c9936f6660141edf0b","src/features/extended_connect/tests/webtransport/sessions.rs":"de3d836f666c2bec31e70b33bdc2669572cabbe17df2225db7282613a224a364","src/features/extended_connect/tests/webtransport/streams.rs":"8b3c34cac1b2171252a4bb53d420ac2098549a20309c327bf56e2e9ba9e33538","src/features/extended_connect/webtransport_session.rs":"a6472eca50a2d097aa6ba8a76b45ae69fe2edd2696b2953945faa3ce6e7417f9","src/features/extended_connect/webtransport_streams.rs":"a9a106eefc93a9f6e9e1c246df64904353de1c4fbcd394b338e6b117f6c677f5","src/features/mod.rs":"925aae4427ad82e4d019354802b223d53db5e5585d4a940f5417a24a9503d7ee","src/frames/hframe.rs":"726842108261c9af1e7576bc546e7bd7bea86fbef4a5804f4b45a2b4612e2679","src/frames/mod.rs":"7d0a46ca147336d14781edb8dbee8b03c2e4bcd6646f5473a9d93d31fe73fecb","src/frames/reader.rs":"4883e25064da1fb3a6ae46b5d15e6bcfec9c5bbea55a1937ecdb9465b62a93b2","src/frames/tests/hframe.rs":"01ec74eb3eb25d95042aa0263f9267f89535e6b7b8c1161fab4ba9ee5352d4a7","src/frames/tests/mod.rs":"0610609b316767a6a022837d32ee0452e37ea296fde37e51bec87e7c77e923a3","src/frames/tests/reader.rs":"2bfadc7afbc41bff9f5f930b31550259a8a92484d35f6c5d8dd8fd9acfb88f5b","src/frames/tests/wtframe.rs":"589ebe1e62ce4da63b37b7d22cde7ba572ddbf29336fdcdbbcd0a745f79dacd8","src/frames/wtframe.rs":"c80518d1569de277767c7ccb7441898aadbfc5fb2afb968c1d5105f8d175ccff","src/headers_checks.rs":"44891c16dda6b7ef742058ecb0a8d34e219c51cae1216c09c661cf72d9a5e7d5","src/lib.rs":"ed8da14e573cc5a97afb012a78af7f076eb83b5cc20cb4fe432eb7136a3ffe52","src/priority.rs":"10d9dcfcd4585f2ca256daf254c78a428297c41976c6548f19cd3ed2222b7cd2","src/push_controller.rs":"eb27c7c2a52c6108c0e4d040b021775a2b573f32d78b7ac8652ff46fd549f780","src/qlog.rs":"b1e6108b018abb077f218d1806e0a83370afa87709e26b3d51f482ae5d9b9c82","src/qpack_decoder_receiver.rs":"c927dfc3e58c71d282210ba79280f6f03e789733bc3bedc247e68bab516b9e9e","src/qpack_encoder_receiver.rs":"d0ac03cc111b6e1c555a8654d3234116f2b135b5b040edac23cefe2d640beba9","src/recv_message.rs":"06666c22101cda41de14682dc7e2e6721f2821bd45baefc22caceae4ccfcf2e0","src/request_target.rs":"6041a69a0a74969ec08bc164509c055e9bad99f53bbeb16c0aa17d108dd68b8c","src/send_message.rs":"70f8a91d85515f42a64a88bd2a9480175b12596bc082f77587cc5bcff9ce996c","src/server.rs":"ab6d4c80cb5f6c070f74d8df27e7bd62d5c8a8e7756ff9d1a31d3f9ff91327a1","src/server_connection_events.rs":"12d353ca6301467f6d475dde3b789951a5716c89ddd7dbf1383efef8082361f3","src/server_events.rs":"c96cff96d5893a9ab7165d17e3d1afaafc5492418b30003c1c26ca8f489ab7ca","src/settings.rs":"476b154b5eea4c8d69a4a790fee3e527cef4d375df1cfb5eed04ec56406fe15a","src/stream_type_reader.rs":"7a7226b7911d69f7e00ec4987c2a32a5e8a33463203398cbee1e6645d2691478","tests/httpconn.rs":"bb6927801a8c75e4f05eb6cdb1e7f2d57be69b74e68ddad2a1614f2aeed04369","tests/priority.rs":"3418be17fbdfdbcfd80dc4532f9365f405925442fabc916f2b22f90aee89629f","tests/send_message.rs":"1e893216d9252e6fb69a0fb291b4f8b8ea954847c346ff7f9347d7895618cabf","tests/webtransport.rs":"cb30d348c0ce05efb722abac3b1c524216fa4cbde8b62a1d1e3238c3fadecbe7"},"package":null} \ No newline at end of file
+{"files":{"Cargo.toml":"458f04261cda071d61402c52cf64062ad7cfc24f3f312bfaa5d52cae47409010","src/buffered_send_stream.rs":"f45bdf9ad2a04b3828c74ff5440681d3c9d1af39b55470e4f729842dc2412295","src/client_events.rs":"77fedca72ce54956eaba3fb7103085d196a631b764662584ea2629224c5c234e","src/conn_params.rs":"224a8ea6ef632930a7788a1cabf47ce69ad41bd4bc8dcf3053fbd998fdb38e82","src/connection.rs":"9384cdfd8481a30a0cd13f56f590188ccfa47b4472f35f7a4978537bab19adc1","src/connection_client.rs":"8db29409f3a265f7dff7c7a7eaf2ac607d6923e4b3238e82eab6dc22854e4303","src/connection_server.rs":"ca33b50650bd1ca2a952851b72712d55ec2e48b48f1f06e4184c808b8e1e009a","src/control_stream_local.rs":"ae52e3286f1686ca1265e7de841392addd42616db02799bb967a59feb6039cb5","src/control_stream_remote.rs":"59eb4041e366d92f9f294e8446755caa5e91fd943bba7b79b726698ba13be248","src/features/extended_connect/mod.rs":"3b02f6b18627f3855465a81b1d9b285e6f13839e75a8a6db648ed9082908d7f0","src/features/extended_connect/tests/mod.rs":"fd6aee37243713e80fc526552f21f0222338cec9890409b6575a2a637b17ec1f","src/features/extended_connect/tests/webtransport/datagrams.rs":"4c85a90afb753ce588e3fdeb773669bc49c013aebc28912340359eb01b74fd70","src/features/extended_connect/tests/webtransport/mod.rs":"a30ea715f5271a826a739278b18e145964dedbce7026eed45f1b7d0355c407d5","src/features/extended_connect/tests/webtransport/negotiation.rs":"98254ef8446581ec520026b04ef9549645602181b61602c9936f6660141edf0b","src/features/extended_connect/tests/webtransport/sessions.rs":"de3d836f666c2bec31e70b33bdc2669572cabbe17df2225db7282613a224a364","src/features/extended_connect/tests/webtransport/streams.rs":"8b3c34cac1b2171252a4bb53d420ac2098549a20309c327bf56e2e9ba9e33538","src/features/extended_connect/webtransport_session.rs":"239d92c06fbc5f6226078bb411a803f57b555dea0077349d49d7f57671cf2eab","src/features/extended_connect/webtransport_streams.rs":"5d7507aaf6a819d266fbea9b7a415c8324329df0f6936d9045b73e17a5b844ee","src/features/mod.rs":"925aae4427ad82e4d019354802b223d53db5e5585d4a940f5417a24a9503d7ee","src/frames/hframe.rs":"56c36ac597504f28c73cf2370acd82104f8c7a7b9ffc0f6d222378abc524482d","src/frames/mod.rs":"7d0a46ca147336d14781edb8dbee8b03c2e4bcd6646f5473a9d93d31fe73fecb","src/frames/reader.rs":"e07ee9de74bc499c10afcda592fefd9a7eef3381c045aa14f6596d67313546ca","src/frames/tests/hframe.rs":"01ec74eb3eb25d95042aa0263f9267f89535e6b7b8c1161fab4ba9ee5352d4a7","src/frames/tests/mod.rs":"0610609b316767a6a022837d32ee0452e37ea296fde37e51bec87e7c77e923a3","src/frames/tests/reader.rs":"2bfadc7afbc41bff9f5f930b31550259a8a92484d35f6c5d8dd8fd9acfb88f5b","src/frames/tests/wtframe.rs":"589ebe1e62ce4da63b37b7d22cde7ba572ddbf29336fdcdbbcd0a745f79dacd8","src/frames/wtframe.rs":"1d9d0256ace2ba7262343ed035df795f21a4d45065792d3fd45b3391b6916b2f","src/headers_checks.rs":"be0f0109298dcc3a40350b7c0950076ddfe20617d195b305e3ffc8582557ab18","src/lib.rs":"4f908a021222bcc79b9d569bc3759a493379a20b47dfa228fddf51600bf6e446","src/priority.rs":"f3b77c208962e44a4e2d13138c6998b703d40e7bcf8f73ea84d8ef5b556e0aee","src/push_controller.rs":"13bccf2834ae19109504cf695a5948c3b2d03fd101bc032a92bb77a033423854","src/qlog.rs":"2debd75c7ea103c95ff79e44412f1408c3e496e324976100c55d5a833912b6c3","src/qpack_decoder_receiver.rs":"c927dfc3e58c71d282210ba79280f6f03e789733bc3bedc247e68bab516b9e9e","src/qpack_encoder_receiver.rs":"d0ac03cc111b6e1c555a8654d3234116f2b135b5b040edac23cefe2d640beba9","src/recv_message.rs":"eb711dbc6b3371373c26b75333ac5858edf0d30184b0e05d67ab02c656eb6619","src/request_target.rs":"6041a69a0a74969ec08bc164509c055e9bad99f53bbeb16c0aa17d108dd68b8c","src/send_message.rs":"7785af11b77cee398faf3f7a2875b41e251ed7a1b272c23f81a48334596ab836","src/server.rs":"b9e6060da36cfb467478f5b78b17e22a123214ad2d64c919ce688ea2bc0e24bb","src/server_connection_events.rs":"12d353ca6301467f6d475dde3b789951a5716c89ddd7dbf1383efef8082361f3","src/server_events.rs":"463dd2cb6f97a800bac32c93c4aa2a6289f71e33a89f3b33152460cb941fc378","src/settings.rs":"476b154b5eea4c8d69a4a790fee3e527cef4d375df1cfb5eed04ec56406fe15a","src/stream_type_reader.rs":"7a7226b7911d69f7e00ec4987c2a32a5e8a33463203398cbee1e6645d2691478","tests/httpconn.rs":"bb6927801a8c75e4f05eb6cdb1e7f2d57be69b74e68ddad2a1614f2aeed04369","tests/priority.rs":"364754507873298612ad12e8d1d106d26d993712142d0be4cbf056da5338854c","tests/send_message.rs":"b5435045b16429d9e626ea94a8f10e2937e1a5a878af0035763a4f5ec09bf53c","tests/webtransport.rs":"25794305017ff58e57dc3c3b9b078e5bfc1814ea82a521b7b7156228e613c092"},"package":null} \ No newline at end of file
diff --git a/third_party/rust/neqo-http3/Cargo.toml b/third_party/rust/neqo-http3/Cargo.toml
index 8eeb2a58bf..12b9a125d0 100644
--- a/third_party/rust/neqo-http3/Cargo.toml
+++ b/third_party/rust/neqo-http3/Cargo.toml
@@ -10,22 +10,24 @@
# See Cargo.toml.orig for the original contents.
[package]
-edition = "2018"
-rust-version = "1.70.0"
+edition = "2021"
+rust-version = "1.74.0"
name = "neqo-http3"
-version = "0.7.0"
-authors = ["Dragana Damjanovic <dragana.damjano@gmail.com>"]
+version = "0.7.2"
+authors = ["The Neqo Authors <necko@mozilla.com>"]
+homepage = "https://github.com/mozilla/neqo/"
license = "MIT OR Apache-2.0"
+repository = "https://github.com/mozilla/neqo/"
-[dependencies]
-enumset = "1.1.2"
-lazy_static = "1.4"
-sfv = "0.9.3"
-smallvec = "1.11.1"
-url = "2.5"
+[lib]
+bench = false
+
+[dependencies.enumset]
+version = "1.1"
+default-features = false
[dependencies.log]
-version = "0.4.17"
+version = "0.4"
default-features = false
[dependencies.neqo-common]
@@ -41,15 +43,30 @@ path = "./../neqo-qpack"
path = "./../neqo-transport"
[dependencies.qlog]
-git = "https://github.com/cloudflare/quiche"
-rev = "09ea4b244096a013071cfe2175bbf2945fb7f8d1"
+version = "0.12"
+default-features = false
+
+[dependencies.sfv]
+version = "0.9"
+default-features = false
+
+[dependencies.smallvec]
+version = "1.11"
+default-features = false
+
+[dependencies.url]
+version = "2.5"
+default-features = false
[dev-dependencies.test-fixture]
path = "../test-fixture"
[features]
-deny-warnings = []
fuzzing = [
"neqo-transport/fuzzing",
"neqo-crypto/fuzzing",
]
+
+[lints.clippy.pedantic]
+level = "warn"
+priority = -1
diff --git a/third_party/rust/neqo-http3/src/client_events.rs b/third_party/rust/neqo-http3/src/client_events.rs
index 4b2ebc6c30..61aba8f9f1 100644
--- a/third_party/rust/neqo-http3/src/client_events.rs
+++ b/third_party/rust/neqo-http3/src/client_events.rs
@@ -61,7 +61,7 @@ pub enum Http3ClientEvent {
error: AppError,
local: bool,
},
- /// Peer has sent a STOP_SENDING.
+ /// Peer has sent a `STOP_SENDING`.
StopSending {
stream_id: StreamId,
error: AppError,
@@ -83,7 +83,7 @@ pub enum Http3ClientEvent {
PushDataReadable { push_id: u64 },
/// A push has been canceled.
PushCanceled { push_id: u64 },
- /// A push stream was been reset due to a HttpGeneralProtocol error.
+ /// A push stream was been reset due to a `HttpGeneralProtocol` error.
/// Most common case are malformed response headers.
PushReset { push_id: u64, error: AppError },
/// New stream can be created
@@ -102,7 +102,7 @@ pub enum Http3ClientEvent {
GoawayReceived,
/// Connection state change.
StateChange(Http3State),
- /// WebTransport events
+ /// `WebTransport` events
WebTransport(WebTransportEvent),
}
diff --git a/third_party/rust/neqo-http3/src/connection.rs b/third_party/rust/neqo-http3/src/connection.rs
index bb2b5a6ce0..287ea2c2af 100644
--- a/third_party/rust/neqo-http3/src/connection.rs
+++ b/third_party/rust/neqo-http3/src/connection.rs
@@ -835,9 +835,6 @@ impl Http3Connection {
final_headers.push(Header::new(":protocol", conn_type.string()));
}
- if let Some(priority_header) = request.priority.header() {
- final_headers.push(priority_header);
- }
final_headers.extend_from_slice(request.headers);
Ok(final_headers)
}
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);
diff --git a/third_party/rust/neqo-http3/src/control_stream_local.rs b/third_party/rust/neqo-http3/src/control_stream_local.rs
index 62676ee391..2f336c63a4 100644
--- a/third_party/rust/neqo-http3/src/control_stream_local.rs
+++ b/third_party/rust/neqo-http3/src/control_stream_local.rs
@@ -4,10 +4,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-use std::{
- collections::{HashMap, VecDeque},
- convert::TryFrom,
-};
+use std::collections::{HashMap, VecDeque};
use neqo_common::{qtrace, Encoder};
use neqo_transport::{Connection, StreamId, StreamType};
diff --git a/third_party/rust/neqo-http3/src/features/extended_connect/tests/webtransport/datagrams.rs b/third_party/rust/neqo-http3/src/features/extended_connect/tests/webtransport/datagrams.rs
index 1c58596dd3..27b7d2b2f2 100644
--- a/third_party/rust/neqo-http3/src/features/extended_connect/tests/webtransport/datagrams.rs
+++ b/third_party/rust/neqo-http3/src/features/extended_connect/tests/webtransport/datagrams.rs
@@ -4,8 +4,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-use std::convert::TryFrom;
-
use neqo_common::Encoder;
use neqo_transport::Error as TransportError;
diff --git a/third_party/rust/neqo-http3/src/features/extended_connect/tests/webtransport/mod.rs b/third_party/rust/neqo-http3/src/features/extended_connect/tests/webtransport/mod.rs
index 51dc47e4c1..3753c3122d 100644
--- a/third_party/rust/neqo-http3/src/features/extended_connect/tests/webtransport/mod.rs
+++ b/third_party/rust/neqo-http3/src/features/extended_connect/tests/webtransport/mod.rs
@@ -14,7 +14,7 @@ use neqo_common::event::Provider;
use neqo_crypto::AuthenticationStatus;
use neqo_transport::{ConnectionParameters, StreamId, StreamType};
use test_fixture::{
- addr, anti_replay, fixture_init, now, CountingConnectionIdGenerator, DEFAULT_ALPN_H3,
+ anti_replay, fixture_init, now, CountingConnectionIdGenerator, DEFAULT_ADDR, DEFAULT_ALPN_H3,
DEFAULT_KEYS, DEFAULT_SERVER_NAME,
};
@@ -38,8 +38,8 @@ pub fn default_http3_client(client_params: Http3Parameters) -> Http3Client {
Http3Client::new(
DEFAULT_SERVER_NAME,
Rc::new(RefCell::new(CountingConnectionIdGenerator::default())),
- addr(),
- addr(),
+ DEFAULT_ADDR,
+ DEFAULT_ADDR,
client_params,
now(),
)
diff --git a/third_party/rust/neqo-http3/src/features/extended_connect/webtransport_session.rs b/third_party/rust/neqo-http3/src/features/extended_connect/webtransport_session.rs
index adbdf07e11..5e89225956 100644
--- a/third_party/rust/neqo-http3/src/features/extended_connect/webtransport_session.rs
+++ b/third_party/rust/neqo-http3/src/features/extended_connect/webtransport_session.rs
@@ -4,13 +4,11 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#![allow(clippy::module_name_repetitions)]
-
-use std::{any::Any, cell::RefCell, collections::BTreeSet, mem, rc::Rc};
+use std::{cell::RefCell, collections::BTreeSet, mem, rc::Rc};
use neqo_common::{qtrace, Encoder, Header, MessageType, Role};
use neqo_qpack::{QPackDecoder, QPackEncoder};
-use neqo_transport::{streams::SendOrder, Connection, DatagramTracking, StreamId};
+use neqo_transport::{Connection, DatagramTracking, StreamId};
use super::{ExtendedConnectEvents, ExtendedConnectType, SessionCloseReason};
use crate::{
@@ -473,10 +471,6 @@ impl HttpRecvStream for Rc<RefCell<WebTransportSession>> {
fn priority_update_sent(&mut self) {
self.borrow_mut().priority_update_sent();
}
-
- fn any(&self) -> &dyn Any {
- self
- }
}
impl SendStream for Rc<RefCell<WebTransportSession>> {
@@ -492,16 +486,6 @@ impl SendStream for Rc<RefCell<WebTransportSession>> {
self.borrow_mut().has_data_to_send()
}
- fn set_sendorder(&mut self, _conn: &mut Connection, _sendorder: Option<SendOrder>) -> Res<()> {
- // Not relevant on session
- Ok(())
- }
-
- fn set_fairness(&mut self, _conn: &mut Connection, _fairness: bool) -> Res<()> {
- // Not relevant on session
- Ok(())
- }
-
fn stream_writable(&self) {}
fn done(&self) -> bool {
diff --git a/third_party/rust/neqo-http3/src/features/extended_connect/webtransport_streams.rs b/third_party/rust/neqo-http3/src/features/extended_connect/webtransport_streams.rs
index 84dcd20618..cdc692b8d7 100644
--- a/third_party/rust/neqo-http3/src/features/extended_connect/webtransport_streams.rs
+++ b/third_party/rust/neqo-http3/src/features/extended_connect/webtransport_streams.rs
@@ -215,16 +215,6 @@ impl SendStream for WebTransportSendStream {
}
}
- fn set_sendorder(&mut self, conn: &mut Connection, sendorder: Option<i64>) -> Res<()> {
- conn.stream_sendorder(self.stream_id, sendorder)
- .map_err(|_| crate::Error::InvalidStreamId)
- }
-
- fn set_fairness(&mut self, conn: &mut Connection, fairness: bool) -> Res<()> {
- conn.stream_fairness(self.stream_id, fairness)
- .map_err(|_| crate::Error::InvalidStreamId)
- }
-
fn handle_stop_sending(&mut self, close_type: CloseType) {
self.set_done(close_type);
}
diff --git a/third_party/rust/neqo-http3/src/frames/hframe.rs b/third_party/rust/neqo-http3/src/frames/hframe.rs
index 83e69ba894..e69f7b449e 100644
--- a/third_party/rust/neqo-http3/src/frames/hframe.rs
+++ b/third_party/rust/neqo-http3/src/frames/hframe.rs
@@ -74,10 +74,7 @@ impl HFrame {
Self::MaxPushId { .. } => H3_FRAME_TYPE_MAX_PUSH_ID,
Self::PriorityUpdateRequest { .. } => H3_FRAME_TYPE_PRIORITY_UPDATE_REQUEST,
Self::PriorityUpdatePush { .. } => H3_FRAME_TYPE_PRIORITY_UPDATE_PUSH,
- Self::Grease => {
- let r = random(7);
- Decoder::from(&r).decode_uint(7).unwrap() * 0x1f + 0x21
- }
+ Self::Grease => Decoder::from(&random::<7>()).decode_uint(7).unwrap() * 0x1f + 0x21,
}
}
@@ -120,7 +117,7 @@ impl HFrame {
}
Self::Grease => {
// Encode some number of random bytes.
- let r = random(8);
+ let r = random::<8>();
enc.encode_vvec(&r[1..usize::from(1 + (r[0] & 0x7))]);
}
Self::PriorityUpdateRequest {
diff --git a/third_party/rust/neqo-http3/src/frames/reader.rs b/third_party/rust/neqo-http3/src/frames/reader.rs
index 5017c666a4..1a086683cf 100644
--- a/third_party/rust/neqo-http3/src/frames/reader.rs
+++ b/third_party/rust/neqo-http3/src/frames/reader.rs
@@ -6,7 +6,7 @@
#![allow(clippy::module_name_repetitions)]
-use std::{convert::TryFrom, fmt::Debug};
+use std::fmt::Debug;
use neqo_common::{
hex_with_len, qtrace, Decoder, IncrementalDecoderBuffer, IncrementalDecoderIgnore,
diff --git a/third_party/rust/neqo-http3/src/frames/wtframe.rs b/third_party/rust/neqo-http3/src/frames/wtframe.rs
index deb7a026a0..20e9b81936 100644
--- a/third_party/rust/neqo-http3/src/frames/wtframe.rs
+++ b/third_party/rust/neqo-http3/src/frames/wtframe.rs
@@ -4,8 +4,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-use std::convert::TryFrom;
-
use neqo_common::{Decoder, Encoder};
use crate::{frames::reader::FrameDecoder, Error, Res};
diff --git a/third_party/rust/neqo-http3/src/headers_checks.rs b/third_party/rust/neqo-http3/src/headers_checks.rs
index 9bf661c8fe..2dbf43cd32 100644
--- a/third_party/rust/neqo-http3/src/headers_checks.rs
+++ b/third_party/rust/neqo-http3/src/headers_checks.rs
@@ -6,8 +6,6 @@
#![allow(clippy::unused_unit)] // see https://github.com/Lymia/enumset/issues/44
-use std::convert::TryFrom;
-
use enumset::{enum_set, EnumSet, EnumSetType};
use neqo_common::Header;
diff --git a/third_party/rust/neqo-http3/src/lib.rs b/third_party/rust/neqo-http3/src/lib.rs
index 635707ca7c..8272151cc1 100644
--- a/third_party/rust/neqo-http3/src/lib.rs
+++ b/third_party/rust/neqo-http3/src/lib.rs
@@ -4,8 +4,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#![cfg_attr(feature = "deny-warnings", deny(warnings))]
-#![warn(clippy::pedantic)]
+#![allow(clippy::module_name_repetitions)] // This lint doesn't work here.
/*!
@@ -160,7 +159,7 @@ mod server_events;
mod settings;
mod stream_type_reader;
-use std::{any::Any, cell::RefCell, fmt::Debug, rc::Rc};
+use std::{cell::RefCell, fmt::Debug, rc::Rc};
use buffered_send_stream::BufferedStream;
pub use client_events::{Http3ClientEvent, WebTransportEvent};
@@ -433,20 +432,15 @@ pub enum Http3StreamType {
}
#[must_use]
-#[derive(PartialEq, Eq, Debug)]
+#[derive(Default, PartialEq, Eq, Debug)]
enum ReceiveOutput {
+ #[default]
NoOutput,
ControlFrames(Vec<HFrame>),
UnblockedStreams(Vec<StreamId>),
NewStream(NewStreamType),
}
-impl Default for ReceiveOutput {
- fn default() -> Self {
- Self::NoOutput
- }
-}
-
trait Stream: Debug {
fn stream_type(&self) -> Http3StreamType;
}
@@ -509,8 +503,6 @@ trait HttpRecvStream: RecvStream {
fn extended_connect_wait_for_response(&self) -> bool {
false
}
-
- fn any(&self) -> &dyn Any;
}
#[derive(Debug, PartialEq, Eq, Copy, Clone)]
@@ -567,27 +559,25 @@ trait HttpRecvStreamEvents: RecvStreamEvents {
trait SendStream: Stream {
/// # Errors
///
- /// Error my occur during sending data, e.g. protocol error, etc.
+ /// Error may occur during sending data, e.g. protocol error, etc.
fn send(&mut self, conn: &mut Connection) -> Res<()>;
fn has_data_to_send(&self) -> bool;
fn stream_writable(&self);
fn done(&self) -> bool;
- fn set_sendorder(&mut self, conn: &mut Connection, sendorder: Option<SendOrder>) -> Res<()>;
- fn set_fairness(&mut self, conn: &mut Connection, fairness: bool) -> Res<()>;
/// # Errors
///
- /// Error my occur during sending data, e.g. protocol error, etc.
+ /// Error may occur during sending data, e.g. protocol error, etc.
fn send_data(&mut self, _conn: &mut Connection, _buf: &[u8]) -> Res<usize>;
/// # Errors
///
- /// It may happen that the transport stream is already close. This is unlikely.
+ /// It may happen that the transport stream is already closed. This is unlikely.
fn close(&mut self, conn: &mut Connection) -> Res<()>;
/// # Errors
///
- /// It may happen that the transport stream is already close. This is unlikely.
+ /// It may happen that the transport stream is already closed. This is unlikely.
fn close_with_message(
&mut self,
_conn: &mut Connection,
@@ -606,7 +596,7 @@ trait SendStream: Stream {
/// # Errors
///
- /// It may happen that the transport stream is already close. This is unlikely.
+ /// It may happen that the transport stream is already closed. This is unlikely.
fn send_data_atomic(&mut self, _conn: &mut Connection, _buf: &[u8]) -> Res<()> {
Err(Error::InvalidStreamId)
}
@@ -627,7 +617,6 @@ trait HttpSendStream: SendStream {
/// This can also return an error if the underlying stream is closed.
fn send_headers(&mut self, headers: &[Header], conn: &mut Connection) -> Res<()>;
fn set_new_listener(&mut self, _conn_events: Box<dyn SendStreamEvents>) {}
- fn any(&self) -> &dyn Any;
}
trait SendStreamEvents: Debug {
diff --git a/third_party/rust/neqo-http3/src/priority.rs b/third_party/rust/neqo-http3/src/priority.rs
index f2651d3bb5..76a2cb9a85 100644
--- a/third_party/rust/neqo-http3/src/priority.rs
+++ b/third_party/rust/neqo-http3/src/priority.rs
@@ -1,4 +1,10 @@
-use std::{convert::TryFrom, fmt};
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use std::fmt;
use neqo_transport::StreamId;
use sfv::{BareItem, Item, ListEntry, Parser};
diff --git a/third_party/rust/neqo-http3/src/push_controller.rs b/third_party/rust/neqo-http3/src/push_controller.rs
index c4591991ae..ab6afccdf6 100644
--- a/third_party/rust/neqo-http3/src/push_controller.rs
+++ b/third_party/rust/neqo-http3/src/push_controller.rs
@@ -1,3 +1,4 @@
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
@@ -6,7 +7,6 @@
use std::{
cell::RefCell,
collections::VecDeque,
- convert::TryFrom,
fmt::{Debug, Display},
mem,
rc::Rc,
diff --git a/third_party/rust/neqo-http3/src/qlog.rs b/third_party/rust/neqo-http3/src/qlog.rs
index c3a13fd19f..81f9245a3c 100644
--- a/third_party/rust/neqo-http3/src/qlog.rs
+++ b/third_party/rust/neqo-http3/src/qlog.rs
@@ -6,14 +6,9 @@
// Functions that handle capturing QLOG traces.
-use std::convert::TryFrom;
-
use neqo_common::qlog::NeqoQlog;
use neqo_transport::StreamId;
-use qlog::{
- self,
- events::{DataRecipient, EventData},
-};
+use qlog::events::{DataRecipient, EventData};
pub fn h3_data_moved_up(qlog: &mut NeqoQlog, stream_id: StreamId, amount: usize) {
qlog.add_event_data(|| {
diff --git a/third_party/rust/neqo-http3/src/recv_message.rs b/third_party/rust/neqo-http3/src/recv_message.rs
index 36e8f65b19..be58b7e47c 100644
--- a/third_party/rust/neqo-http3/src/recv_message.rs
+++ b/third_party/rust/neqo-http3/src/recv_message.rs
@@ -4,9 +4,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-use std::{
- any::Any, cell::RefCell, cmp::min, collections::VecDeque, convert::TryFrom, fmt::Debug, rc::Rc,
-};
+use std::{cell::RefCell, cmp::min, collections::VecDeque, fmt::Debug, rc::Rc};
use neqo_common::{qdebug, qinfo, qtrace, Header};
use neqo_qpack::decoder::QPackDecoder;
@@ -494,8 +492,4 @@ impl HttpRecvStream for RecvMessage {
fn extended_connect_wait_for_response(&self) -> bool {
matches!(self.state, RecvMessageState::ExtendedConnect)
}
-
- fn any(&self) -> &dyn Any {
- self
- }
}
diff --git a/third_party/rust/neqo-http3/src/send_message.rs b/third_party/rust/neqo-http3/src/send_message.rs
index 96156938a0..c50e3e056a 100644
--- a/third_party/rust/neqo-http3/src/send_message.rs
+++ b/third_party/rust/neqo-http3/src/send_message.rs
@@ -4,11 +4,11 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-use std::{any::Any, cell::RefCell, cmp::min, fmt::Debug, rc::Rc};
+use std::{cell::RefCell, cmp::min, fmt::Debug, rc::Rc};
use neqo_common::{qdebug, qinfo, qtrace, Encoder, Header, MessageType};
use neqo_qpack::encoder::QPackEncoder;
-use neqo_transport::{streams::SendOrder, Connection, StreamId};
+use neqo_transport::{Connection, StreamId};
use crate::{
frames::HFrame,
@@ -270,16 +270,6 @@ impl SendStream for SendMessage {
self.stream.has_buffered_data()
}
- fn set_sendorder(&mut self, _conn: &mut Connection, _sendorder: Option<SendOrder>) -> Res<()> {
- // Not relevant for SendMessage
- Ok(())
- }
-
- fn set_fairness(&mut self, _conn: &mut Connection, _fairness: bool) -> Res<()> {
- // Not relevant for SendMessage
- Ok(())
- }
-
fn close(&mut self, conn: &mut Connection) -> Res<()> {
self.state.fin()?;
if !self.stream.has_buffered_data() {
@@ -332,10 +322,6 @@ impl HttpSendStream for SendMessage {
self.stream_type = Http3StreamType::ExtendedConnect;
self.conn_events = conn_events;
}
-
- fn any(&self) -> &dyn Any {
- self
- }
}
impl ::std::fmt::Display for SendMessage {
diff --git a/third_party/rust/neqo-http3/src/server.rs b/third_party/rust/neqo-http3/src/server.rs
index b29f715451..1396a4e4cf 100644
--- a/third_party/rust/neqo-http3/src/server.rs
+++ b/third_party/rust/neqo-http3/src/server.rs
@@ -151,7 +151,7 @@ impl Http3Server {
active_conns.dedup();
active_conns
.iter()
- .for_each(|conn| self.server.add_to_waiting(conn.clone()));
+ .for_each(|conn| self.server.add_to_waiting(conn));
for mut conn in active_conns {
self.process_events(&mut conn, now);
}
@@ -1271,11 +1271,11 @@ mod tests {
while let Some(event) = hconn.next_event() {
match event {
Http3ServerEvent::Headers { stream, .. } => {
- assert!(requests.get(&stream).is_none());
+ assert!(!requests.contains_key(&stream));
requests.insert(stream, 0);
}
Http3ServerEvent::Data { stream, .. } => {
- assert!(requests.get(&stream).is_some());
+ assert!(requests.contains_key(&stream));
}
Http3ServerEvent::DataWritable { .. }
| Http3ServerEvent::StreamReset { .. }
diff --git a/third_party/rust/neqo-http3/src/server_events.rs b/third_party/rust/neqo-http3/src/server_events.rs
index 4be48363df..a85ece0bfb 100644
--- a/third_party/rust/neqo-http3/src/server_events.rs
+++ b/third_party/rust/neqo-http3/src/server_events.rs
@@ -9,7 +9,6 @@
use std::{
cell::RefCell,
collections::VecDeque,
- convert::TryFrom,
ops::{Deref, DerefMut},
rc::Rc,
};
diff --git a/third_party/rust/neqo-http3/tests/priority.rs b/third_party/rust/neqo-http3/tests/priority.rs
index cdec161058..77d19e6fcf 100644
--- a/third_party/rust/neqo-http3/tests/priority.rs
+++ b/third_party/rust/neqo-http3/tests/priority.rs
@@ -68,7 +68,7 @@ fn priority_update() {
Instant::now(),
"GET",
&("https", "something.com", "/"),
- &[],
+ &[Header::new("priority", "u=4,i")],
Priority::new(4, true),
)
.unwrap();
@@ -98,7 +98,7 @@ fn priority_update() {
assert_eq!(&headers, expected_headers);
assert!(!fin);
}
- other => panic!("unexpected server event: {:?}", other),
+ other => panic!("unexpected server event: {other:?}"),
}
let update_priority = Priority::new(3, false);
@@ -129,7 +129,7 @@ fn priority_update_dont_send_for_cancelled_stream() {
Instant::now(),
"GET",
&("https", "something.com", "/"),
- &[],
+ &[Header::new("priority", "u=5")],
Priority::new(5, false),
)
.unwrap();
diff --git a/third_party/rust/neqo-http3/tests/send_message.rs b/third_party/rust/neqo-http3/tests/send_message.rs
index 507c4bd552..fbf9a7a3ea 100644
--- a/third_party/rust/neqo-http3/tests/send_message.rs
+++ b/third_party/rust/neqo-http3/tests/send_message.rs
@@ -4,7 +4,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-use lazy_static::lazy_static;
+use std::sync::OnceLock;
+
use neqo_common::event::Provider;
use neqo_crypto::AuthenticationStatus;
use neqo_http3::{
@@ -15,14 +16,14 @@ use test_fixture::*;
const RESPONSE_DATA: &[u8] = &[0x61, 0x62, 0x63];
-lazy_static! {
- static ref RESPONSE_HEADER_NO_DATA: Vec<Header> =
- vec![Header::new(":status", "200"), Header::new("something", "3")];
+fn response_header_no_data() -> &'static Vec<Header> {
+ static HEADERS: OnceLock<Vec<Header>> = OnceLock::new();
+ HEADERS.get_or_init(|| vec![Header::new(":status", "200"), Header::new("something", "3")])
}
-lazy_static! {
- static ref RESPONSE_HEADER_103: Vec<Header> =
- vec![Header::new(":status", "103"), Header::new("link", "...")];
+fn response_header_103() -> &'static Vec<Header> {
+ static HEADERS: OnceLock<Vec<Header>> = OnceLock::new();
+ HEADERS.get_or_init(|| vec![Header::new(":status", "103"), Header::new("link", "...")])
}
fn exchange_packets(client: &mut Http3Client, server: &mut Http3Server) {
@@ -68,7 +69,7 @@ fn send_trailers(request: &mut Http3OrWebTransportStream) -> Result<(), Error> {
}
fn send_informational_headers(request: &mut Http3OrWebTransportStream) -> Result<(), Error> {
- request.send_headers(&RESPONSE_HEADER_103)
+ request.send_headers(response_header_103())
}
fn send_headers(request: &mut Http3OrWebTransportStream) -> Result<(), Error> {
@@ -90,7 +91,7 @@ fn process_client_events(conn: &mut Http3Client) {
Header::new(":status", "200"),
Header::new("content-length", "3"),
])
- || (headers.as_ref() == *RESPONSE_HEADER_103)
+ || (headers.as_ref() == *response_header_103())
);
assert!(!fin);
response_header_found = true;
@@ -116,7 +117,7 @@ fn process_client_events_no_data(conn: &mut Http3Client) {
while let Some(event) = conn.next_event() {
match event {
Http3ClientEvent::HeaderReady { headers, fin, .. } => {
- assert_eq!(headers.as_ref(), *RESPONSE_HEADER_NO_DATA);
+ assert_eq!(headers.as_ref(), *response_header_no_data());
fin_received = fin;
response_header_found = true;
}
@@ -201,7 +202,7 @@ fn response_trailers3() {
#[test]
fn response_trailers_no_data() {
let (mut hconn_c, mut hconn_s, mut request) = connect_send_and_receive_request();
- request.send_headers(&RESPONSE_HEADER_NO_DATA).unwrap();
+ request.send_headers(response_header_no_data()).unwrap();
exchange_packets(&mut hconn_c, &mut hconn_s);
send_trailers(&mut request).unwrap();
exchange_packets(&mut hconn_c, &mut hconn_s);
@@ -258,10 +259,10 @@ fn trailers_after_close() {
#[test]
fn multiple_response_headers() {
let (mut hconn_c, mut hconn_s, mut request) = connect_send_and_receive_request();
- request.send_headers(&RESPONSE_HEADER_NO_DATA).unwrap();
+ request.send_headers(response_header_no_data()).unwrap();
assert_eq!(
- request.send_headers(&RESPONSE_HEADER_NO_DATA),
+ request.send_headers(response_header_no_data()),
Err(Error::InvalidHeader)
);
@@ -273,7 +274,7 @@ fn multiple_response_headers() {
#[test]
fn informational_after_response_headers() {
let (mut hconn_c, mut hconn_s, mut request) = connect_send_and_receive_request();
- request.send_headers(&RESPONSE_HEADER_NO_DATA).unwrap();
+ request.send_headers(response_header_no_data()).unwrap();
assert_eq!(
send_informational_headers(&mut request),
@@ -307,7 +308,7 @@ fn non_trailers_headers_after_data() {
exchange_packets(&mut hconn_c, &mut hconn_s);
assert_eq!(
- request.send_headers(&RESPONSE_HEADER_NO_DATA),
+ request.send_headers(response_header_no_data()),
Err(Error::InvalidHeader)
);
diff --git a/third_party/rust/neqo-http3/tests/webtransport.rs b/third_party/rust/neqo-http3/tests/webtransport.rs
index 4e943d86cb..b1e18a5a98 100644
--- a/third_party/rust/neqo-http3/tests/webtransport.rs
+++ b/third_party/rust/neqo-http3/tests/webtransport.rs
@@ -15,7 +15,7 @@ use neqo_http3::{
};
use neqo_transport::{StreamId, StreamType};
use test_fixture::{
- addr, anti_replay, fixture_init, now, CountingConnectionIdGenerator, DEFAULT_ALPN_H3,
+ anti_replay, fixture_init, now, CountingConnectionIdGenerator, DEFAULT_ADDR, DEFAULT_ALPN_H3,
DEFAULT_KEYS, DEFAULT_SERVER_NAME,
};
@@ -24,8 +24,8 @@ fn connect() -> (Http3Client, Http3Server) {
let mut client = Http3Client::new(
DEFAULT_SERVER_NAME,
Rc::new(RefCell::new(CountingConnectionIdGenerator::default())),
- addr(),
- addr(),
+ DEFAULT_ADDR,
+ DEFAULT_ADDR,
Http3Parameters::default().webtransport(true),
now(),
)