summaryrefslogtreecommitdiffstats
path: root/third_party/rust/neqo-http3
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
commit8dd16259287f58f9273002717ec4d27e97127719 (patch)
tree3863e62a53829a84037444beab3abd4ed9dfc7d0 /third_party/rust/neqo-http3
parentReleasing progress-linux version 126.0.1-1~progress7.99u1. (diff)
downloadfirefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz
firefox-8dd16259287f58f9273002717ec4d27e97127719.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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.toml6
-rw-r--r--third_party/rust/neqo-http3/src/buffered_send_stream.rs51
-rw-r--r--third_party/rust/neqo-http3/src/connection.rs20
-rw-r--r--third_party/rust/neqo-http3/src/connection_client.rs20
-rw-r--r--third_party/rust/neqo-http3/src/features/extended_connect/tests/webtransport/negotiation.rs7
-rw-r--r--third_party/rust/neqo-http3/src/send_message.rs4
-rw-r--r--third_party/rust/neqo-http3/src/server.rs4
-rw-r--r--third_party/rust/neqo-http3/tests/httpconn.rs4
9 files changed, 59 insertions, 59 deletions
diff --git a/third_party/rust/neqo-http3/.cargo-checksum.json b/third_party/rust/neqo-http3/.cargo-checksum.json
index dff33cc964..f456e3f62d 100644
--- a/third_party/rust/neqo-http3/.cargo-checksum.json
+++ b/third_party/rust/neqo-http3/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"Cargo.toml":"f3d4e7ace03bbc6ee36fb30540e0a96aebdf5222090cd95abdff14b840cfa68e","src/buffered_send_stream.rs":"f45bdf9ad2a04b3828c74ff5440681d3c9d1af39b55470e4f729842dc2412295","src/client_events.rs":"77fedca72ce54956eaba3fb7103085d196a631b764662584ea2629224c5c234e","src/conn_params.rs":"224a8ea6ef632930a7788a1cabf47ce69ad41bd4bc8dcf3053fbd998fdb38e82","src/connection.rs":"e9c869ec4c650162927543cfe608721fad037554c5101962b323496bf69e29a5","src/connection_client.rs":"2026e7b2c11f4d5a71b35eedaf14175d7d7cf96ce2bb64c4a97d6062cbb646c7","src/connection_server.rs":"de5a6cb42b8c4dc08fb1f626f681b45cd22435892b11e6053b61a5401490db94","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":"7ac8d4057ba53874e4edfc62cd25ad5d3f0b10aaac5bf6e156103c3bc44e18cc","src/request_target.rs":"6041a69a0a74969ec08bc164509c055e9bad99f53bbeb16c0aa17d108dd68b8c","src/send_message.rs":"374e168f60063b8102a2aff52c719ae2e1e5078527cf50d095b3e7217f6ec7d2","src/server.rs":"b9e6060da36cfb467478f5b78b17e22a123214ad2d64c919ce688ea2bc0e24bb","src/server_connection_events.rs":"12d353ca6301467f6d475dde3b789951a5716c89ddd7dbf1383efef8082361f3","src/server_events.rs":"1cda8d6c413fad0fa67fcfd7cb78e795bf7ef7f0e09b5720992646a82d51ce16","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
+{"files":{"Cargo.toml":"08e52a9eb3d14c9b985d5ab9e88f2bfec51bc9f13b6d62d84e143aece1f55654","src/buffered_send_stream.rs":"0e8ad3f443a33e213d55ba26a1ff266692c9087a1627c9b3d10c5025dee550ac","src/client_events.rs":"77fedca72ce54956eaba3fb7103085d196a631b764662584ea2629224c5c234e","src/conn_params.rs":"224a8ea6ef632930a7788a1cabf47ce69ad41bd4bc8dcf3053fbd998fdb38e82","src/connection.rs":"f5f49dd72170f7e42c180b738ff8bddae92fd0c71acc5a08736e298bf53483e7","src/connection_client.rs":"77cf08711b89e03c7cea47bf3cf02c76397485877121e42c321206cf7bef4ddc","src/connection_server.rs":"de5a6cb42b8c4dc08fb1f626f681b45cd22435892b11e6053b61a5401490db94","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":"a8940b99e21a6b29fef2fc32f3dce05d12de8b09079dfdc0502c13e4582dbdb6","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":"7ac8d4057ba53874e4edfc62cd25ad5d3f0b10aaac5bf6e156103c3bc44e18cc","src/request_target.rs":"6041a69a0a74969ec08bc164509c055e9bad99f53bbeb16c0aa17d108dd68b8c","src/send_message.rs":"bc1bb096e56560088db961ab0f7a4e08acd3d3977f483ffcbdcfeec7ed8d855a","src/server.rs":"24822b9b164271862777cf5afcc74edbecaa4ce648978b0a6559e1490e3cea55","src/server_connection_events.rs":"12d353ca6301467f6d475dde3b789951a5716c89ddd7dbf1383efef8082361f3","src/server_events.rs":"1cda8d6c413fad0fa67fcfd7cb78e795bf7ef7f0e09b5720992646a82d51ce16","src/settings.rs":"476b154b5eea4c8d69a4a790fee3e527cef4d375df1cfb5eed04ec56406fe15a","src/stream_type_reader.rs":"7a7226b7911d69f7e00ec4987c2a32a5e8a33463203398cbee1e6645d2691478","tests/httpconn.rs":"ee2f29c6104f5379bee2606f160005683f00ae85f2c43216e7ffaa89ff633466","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 c844ba43ef..6ab5f166f4 100644
--- a/third_party/rust/neqo-http3/Cargo.toml
+++ b/third_party/rust/neqo-http3/Cargo.toml
@@ -11,9 +11,9 @@
[package]
edition = "2021"
-rust-version = "1.74.0"
+rust-version = "1.76.0"
name = "neqo-http3"
-version = "0.7.5"
+version = "0.7.7"
authors = ["The Neqo Authors <necko@mozilla.com>"]
homepage = "https://github.com/mozilla/neqo/"
license = "MIT OR Apache-2.0"
@@ -43,7 +43,7 @@ path = "./../neqo-qpack"
path = "./../neqo-transport"
[dependencies.qlog]
-version = "0.12"
+version = "0.13"
default-features = false
[dependencies.sfv]
diff --git a/third_party/rust/neqo-http3/src/buffered_send_stream.rs b/third_party/rust/neqo-http3/src/buffered_send_stream.rs
index 4f6761fa80..60da0512b5 100644
--- a/third_party/rust/neqo-http3/src/buffered_send_stream.rs
+++ b/third_party/rust/neqo-http3/src/buffered_send_stream.rs
@@ -7,7 +7,7 @@
use neqo_common::qtrace;
use neqo_transport::{Connection, StreamId};
-use crate::Res;
+use crate::{qlog, Res};
#[derive(Debug, PartialEq, Eq)]
pub enum BufferedStream {
@@ -38,7 +38,7 @@ impl BufferedStream {
/// # Panics
///
- /// If the `BufferedStream` is initialized more than one it will panic.
+ /// If the `BufferedStream` is initialized more than once, it will panic.
pub fn init(&mut self, stream_id: StreamId) {
debug_assert!(&Self::Uninitialized == self);
*self = Self::Initialized {
@@ -63,19 +63,23 @@ impl BufferedStream {
/// Returns `neqo_transport` errors.
pub fn send_buffer(&mut self, conn: &mut Connection) -> Res<usize> {
let label = ::neqo_common::log_subject!(::log::Level::Debug, self);
- let mut sent = 0;
- if let Self::Initialized { stream_id, buf } = self {
- if !buf.is_empty() {
- qtrace!([label], "sending data.");
- sent = conn.stream_send(*stream_id, &buf[..])?;
- if sent == buf.len() {
- buf.clear();
- } else {
- let b = buf.split_off(sent);
- *buf = b;
- }
- }
+ let Self::Initialized { stream_id, buf } = self else {
+ return Ok(0);
+ };
+ if buf.is_empty() {
+ return Ok(0);
+ }
+ qtrace!([label], "sending data.");
+ let sent = conn.stream_send(*stream_id, &buf[..])?;
+ if sent == 0 {
+ return Ok(0);
+ } else if sent == buf.len() {
+ buf.clear();
+ } else {
+ let b = buf.split_off(sent);
+ *buf = b;
}
+ qlog::h3_data_moved_down(conn.qlog_mut(), *stream_id, sent);
Ok(sent)
}
@@ -85,16 +89,17 @@ impl BufferedStream {
pub fn send_atomic(&mut self, conn: &mut Connection, to_send: &[u8]) -> Res<bool> {
// First try to send anything that is in the buffer.
self.send_buffer(conn)?;
- if let Self::Initialized { stream_id, buf } = self {
- if buf.is_empty() {
- let res = conn.stream_send_atomic(*stream_id, to_send)?;
- Ok(res)
- } else {
- Ok(false)
- }
- } else {
- Ok(false)
+ let Self::Initialized { stream_id, buf } = self else {
+ return Ok(false);
+ };
+ if !buf.is_empty() {
+ return Ok(false);
+ }
+ let res = conn.stream_send_atomic(*stream_id, to_send)?;
+ if res {
+ qlog::h3_data_moved_down(conn.qlog_mut(), *stream_id, to_send.len());
}
+ Ok(res)
}
#[must_use]
diff --git a/third_party/rust/neqo-http3/src/connection.rs b/third_party/rust/neqo-http3/src/connection.rs
index dd45797baa..d14eb6f2a5 100644
--- a/third_party/rust/neqo-http3/src/connection.rs
+++ b/third_party/rust/neqo-http3/src/connection.rs
@@ -17,7 +17,7 @@ use std::{
use neqo_common::{qdebug, qerror, qinfo, qtrace, qwarn, Decoder, Header, MessageType, Role};
use neqo_qpack::{decoder::QPackDecoder, encoder::QPackEncoder};
use neqo_transport::{
- streams::SendOrder, AppError, Connection, ConnectionError, DatagramTracking, State, StreamId,
+ streams::SendOrder, AppError, CloseReason, Connection, DatagramTracking, State, StreamId,
StreamType, ZeroRttState,
};
@@ -81,22 +81,22 @@ enum Http3RemoteSettingsState {
/// - `ZeroRtt`: 0-RTT has been enabled and is active
/// - Connected
/// - GoingAway(StreamId): The connection has received a `GOAWAY` frame
-/// - Closing(ConnectionError): The connection is closed. The closing has been initiated by this end
-/// of the connection, e.g., the `CONNECTION_CLOSE` frame has been sent. In this state, the
+/// - Closing(CloseReason): The connection is closed. The closing has been initiated by this end of
+/// the connection, e.g., the `CONNECTION_CLOSE` frame has been sent. In this state, the
/// connection waits a certain amount of time to retransmit the `CONNECTION_CLOSE` frame if
/// needed.
-/// - Closed(ConnectionError): This is the final close state: closing has been initialized by the
-/// peer and an ack for the `CONNECTION_CLOSE` frame has been sent or the closing has been
-/// initiated by this end of the connection and the ack for the `CONNECTION_CLOSE` has been
-/// received or the waiting time has passed.
+/// - Closed(CloseReason): This is the final close state: closing has been initialized by the peer
+/// and an ack for the `CONNECTION_CLOSE` frame has been sent or the closing has been initiated by
+/// this end of the connection and the ack for the `CONNECTION_CLOSE` has been received or the
+/// waiting time has passed.
#[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Clone)]
pub enum Http3State {
Initializing,
ZeroRtt,
Connected,
GoingAway(StreamId),
- Closing(ConnectionError),
- Closed(ConnectionError),
+ Closing(CloseReason),
+ Closed(CloseReason),
}
impl Http3State {
@@ -767,7 +767,7 @@ impl Http3Connection {
/// This is called when an application closes the connection.
pub fn close(&mut self, error: AppError) {
qdebug!([self], "Close connection error {:?}.", error);
- self.state = Http3State::Closing(ConnectionError::Application(error));
+ self.state = Http3State::Closing(CloseReason::Application(error));
if (!self.send_streams.is_empty() || !self.recv_streams.is_empty()) && (error == 0) {
qwarn!("close(0) called when streams still active");
}
diff --git a/third_party/rust/neqo-http3/src/connection_client.rs b/third_party/rust/neqo-http3/src/connection_client.rs
index 4c8772d14a..18e513e743 100644
--- a/third_party/rust/neqo-http3/src/connection_client.rs
+++ b/third_party/rust/neqo-http3/src/connection_client.rs
@@ -1291,8 +1291,8 @@ mod tests {
use neqo_crypto::{AllowZeroRtt, AntiReplay, ResumptionToken};
use neqo_qpack::{encoder::QPackEncoder, QpackSettings};
use neqo_transport::{
- ConnectionError, ConnectionEvent, ConnectionParameters, Output, State, StreamId,
- StreamType, Version, RECV_BUFFER_SIZE, SEND_BUFFER_SIZE,
+ CloseReason, ConnectionEvent, ConnectionParameters, Output, State, StreamId, StreamType,
+ Version, RECV_BUFFER_SIZE, SEND_BUFFER_SIZE,
};
use test_fixture::{
anti_replay, default_server_h3, fixture_init, new_server, now,
@@ -1314,7 +1314,7 @@ mod tests {
fn assert_closed(client: &Http3Client, expected: &Error) {
match client.state() {
Http3State::Closing(err) | Http3State::Closed(err) => {
- assert_eq!(err, ConnectionError::Application(expected.code()));
+ assert_eq!(err, CloseReason::Application(expected.code()));
}
_ => panic!("Wrong state {:?}", client.state()),
};
@@ -4419,7 +4419,7 @@ mod tests {
HSetting::new(HSettingType::BlockedStreams, 100),
HSetting::new(HSettingType::MaxHeaderListSize, 10000),
],
- &Http3State::Closing(ConnectionError::Application(265)),
+ &Http3State::Closing(CloseReason::Application(265)),
ENCODER_STREAM_DATA_WITH_CAP_INSTRUCTION,
);
}
@@ -4437,7 +4437,7 @@ mod tests {
HSetting::new(HSettingType::MaxTableCapacity, 100),
HSetting::new(HSettingType::MaxHeaderListSize, 10000),
],
- &Http3State::Closing(ConnectionError::Application(265)),
+ &Http3State::Closing(CloseReason::Application(265)),
ENCODER_STREAM_DATA_WITH_CAP_INSTRUCTION,
);
}
@@ -4474,7 +4474,7 @@ mod tests {
HSetting::new(HSettingType::BlockedStreams, 100),
HSetting::new(HSettingType::MaxHeaderListSize, 10000),
],
- &Http3State::Closing(ConnectionError::Application(514)),
+ &Http3State::Closing(CloseReason::Application(514)),
ENCODER_STREAM_DATA_WITH_CAP_INSTRUCTION,
);
}
@@ -4493,7 +4493,7 @@ mod tests {
HSetting::new(HSettingType::BlockedStreams, 100),
HSetting::new(HSettingType::MaxHeaderListSize, 10000),
],
- &Http3State::Closing(ConnectionError::Application(265)),
+ &Http3State::Closing(CloseReason::Application(265)),
ENCODER_STREAM_DATA_WITH_CAP_INSTRUCTION,
);
}
@@ -4531,7 +4531,7 @@ mod tests {
HSetting::new(HSettingType::BlockedStreams, 50),
HSetting::new(HSettingType::MaxHeaderListSize, 10000),
],
- &Http3State::Closing(ConnectionError::Application(265)),
+ &Http3State::Closing(CloseReason::Application(265)),
ENCODER_STREAM_DATA_WITH_CAP_INSTRUCTION,
);
}
@@ -4569,7 +4569,7 @@ mod tests {
HSetting::new(HSettingType::BlockedStreams, 100),
HSetting::new(HSettingType::MaxHeaderListSize, 5000),
],
- &Http3State::Closing(ConnectionError::Application(265)),
+ &Http3State::Closing(CloseReason::Application(265)),
ENCODER_STREAM_DATA_WITH_CAP_INSTRUCTION,
);
}
@@ -4626,7 +4626,7 @@ mod tests {
HSetting::new(HSettingType::BlockedStreams, 100),
HSetting::new(HSettingType::MaxHeaderListSize, 10000),
],
- &Http3State::Closing(ConnectionError::Application(265)),
+ &Http3State::Closing(CloseReason::Application(265)),
ENCODER_STREAM_DATA_WITH_CAP_INSTRUCTION,
);
}
diff --git a/third_party/rust/neqo-http3/src/features/extended_connect/tests/webtransport/negotiation.rs b/third_party/rust/neqo-http3/src/features/extended_connect/tests/webtransport/negotiation.rs
index 27f669861d..9b54f1dc46 100644
--- a/third_party/rust/neqo-http3/src/features/extended_connect/tests/webtransport/negotiation.rs
+++ b/third_party/rust/neqo-http3/src/features/extended_connect/tests/webtransport/negotiation.rs
@@ -8,7 +8,7 @@ use std::time::Duration;
use neqo_common::{event::Provider, Encoder};
use neqo_crypto::AuthenticationStatus;
-use neqo_transport::{Connection, ConnectionError, StreamType};
+use neqo_transport::{CloseReason, Connection, StreamType};
use test_fixture::{default_server_h3, now};
use super::{connect, default_http3_client, default_http3_server, exchange_packets};
@@ -270,10 +270,7 @@ fn wrong_setting_value() {
exchange_packets2(&mut client, &mut server);
match client.state() {
Http3State::Closing(err) | Http3State::Closed(err) => {
- assert_eq!(
- err,
- ConnectionError::Application(Error::HttpSettings.code())
- );
+ assert_eq!(err, CloseReason::Application(Error::HttpSettings.code()));
}
_ => panic!("Wrong state {:?}", client.state()),
};
diff --git a/third_party/rust/neqo-http3/src/send_message.rs b/third_party/rust/neqo-http3/src/send_message.rs
index 15965c44f6..7fb37beb70 100644
--- a/third_party/rust/neqo-http3/src/send_message.rs
+++ b/third_party/rust/neqo-http3/src/send_message.rs
@@ -13,7 +13,7 @@ use neqo_transport::{Connection, StreamId};
use crate::{
frames::HFrame,
headers_checks::{headers_valid, is_interim, trailers_valid},
- qlog, BufferedStream, CloseType, Error, Http3StreamInfo, Http3StreamType, HttpSendStream, Res,
+ BufferedStream, CloseType, Error, Http3StreamInfo, Http3StreamType, HttpSendStream, Res,
SendStream, SendStreamEvents, Stream,
};
@@ -216,7 +216,6 @@ impl SendStream for SendMessage {
.send_atomic(conn, &buf[..to_send])
.map_err(|e| Error::map_stream_send_errors(&e))?;
debug_assert!(sent);
- qlog::h3_data_moved_down(conn.qlog_mut(), self.stream_id(), to_send);
Ok(to_send)
}
@@ -243,7 +242,6 @@ impl SendStream for SendMessage {
/// info that the stream has been closed.)
fn send(&mut self, conn: &mut Connection) -> Res<()> {
let sent = Error::map_error(self.stream.send_buffer(conn), Error::HttpInternal(5))?;
- qlog::h3_data_moved_down(conn.qlog_mut(), self.stream_id(), sent);
qtrace!([self], "{} bytes sent", sent);
if !self.stream.has_buffered_data() {
diff --git a/third_party/rust/neqo-http3/src/server.rs b/third_party/rust/neqo-http3/src/server.rs
index 1396a4e4cf..8fce803fb3 100644
--- a/third_party/rust/neqo-http3/src/server.rs
+++ b/third_party/rust/neqo-http3/src/server.rs
@@ -323,7 +323,7 @@ mod tests {
use neqo_crypto::{AuthenticationStatus, ZeroRttCheckResult, ZeroRttChecker};
use neqo_qpack::{encoder::QPackEncoder, QpackSettings};
use neqo_transport::{
- Connection, ConnectionError, ConnectionEvent, State, StreamId, StreamType, ZeroRttState,
+ CloseReason, Connection, ConnectionEvent, State, StreamId, StreamType, ZeroRttState,
};
use test_fixture::{
anti_replay, default_client, fixture_init, now, CountingConnectionIdGenerator,
@@ -366,7 +366,7 @@ mod tests {
}
fn assert_closed(hconn: &mut Http3Server, expected: &Error) {
- let err = ConnectionError::Application(expected.code());
+ let err = CloseReason::Application(expected.code());
let closed = |e| matches!(e, Http3ServerEvent::StateChange{ state: Http3State::Closing(e) | Http3State::Closed(e), .. } if e == err);
assert!(hconn.events().any(closed));
}
diff --git a/third_party/rust/neqo-http3/tests/httpconn.rs b/third_party/rust/neqo-http3/tests/httpconn.rs
index a0b2bcdb80..c0c62de9c9 100644
--- a/third_party/rust/neqo-http3/tests/httpconn.rs
+++ b/third_party/rust/neqo-http3/tests/httpconn.rs
@@ -17,7 +17,7 @@ use neqo_http3::{
Header, Http3Client, Http3ClientEvent, Http3OrWebTransportStream, Http3Parameters, Http3Server,
Http3ServerEvent, Http3State, Priority,
};
-use neqo_transport::{ConnectionError, ConnectionParameters, Error, Output, StreamType};
+use neqo_transport::{CloseReason, ConnectionParameters, Error, Output, StreamType};
use test_fixture::*;
const RESPONSE_DATA: &[u8] = &[0x61, 0x62, 0x63];
@@ -448,7 +448,7 @@ fn fetch_noresponse_will_idletimeout() {
if let Http3ClientEvent::StateChange(state) = event {
match state {
Http3State::Closing(error_code) | Http3State::Closed(error_code) => {
- assert_eq!(error_code, ConnectionError::Transport(Error::IdleTimeout));
+ assert_eq!(error_code, CloseReason::Transport(Error::IdleTimeout));
done = true;
}
_ => {}