diff --git a/neqo-http3/src/connection.rs b/neqo-http3/src/connection.rs index 2e8e864bdf..f1d5aec820 100644 --- a/neqo-http3/src/connection.rs +++ b/neqo-http3/src/connection.rs @@ -1699,6 +1699,7 @@ impl Http3Connection { HSettingType::MaxHeaderListSize, HSettingType::MaxTableCapacity, HSettingType::BlockedStreams, + HSettingType::EnableConnect, // [RFC 9297, Section 2.1.1](https://www.rfc-editor.org/rfc/rfc9297.html#section-2.1.1) // requires a client that stored SETTINGS_H3_DATAGRAM with its // 0-RTT state to terminate the connection with H3_SETTINGS_ERROR diff --git a/neqo-http3/src/connection_client.rs b/neqo-http3/src/connection_client.rs index 5bfcedf8ed..09310fb393 100644 --- a/neqo-http3/src/connection_client.rs +++ b/neqo-http3/src/connection_client.rs @@ -4276,6 +4276,26 @@ mod tests { ); } + #[test] + fn zero_rtt_extended_connect_disabled() { + // The server advertised SETTINGS_ENABLE_CONNECT_PROTOCOL=1 before, and now withholds it. + zero_rtt_change_settings( + &[ + HSetting::new(HSettingType::MaxTableCapacity, 100), + HSetting::new(HSettingType::BlockedStreams, 100), + HSetting::new(HSettingType::MaxHeaderListSize, 10000), + HSetting::new(HSettingType::EnableConnect, 1), + ], + &[ + HSetting::new(HSettingType::MaxTableCapacity, 100), + HSetting::new(HSettingType::BlockedStreams, 100), + HSetting::new(HSettingType::MaxHeaderListSize, 10000), + ], + &Http3State::Closing(CloseReason::Application(265)), + ENCODER_STREAM_DATA_WITH_CAP_INSTRUCTION, + ); + } + #[test] fn zero_rtt_max_table_size_first_omitted() { // send server original settings without MaxTableCapacity