Skip to content

Commit

Permalink
Revert "Added when enable push is None"
Browse files Browse the repository at this point in the history
This reverts commit 648f9aa.
  • Loading branch information
0x676e67 committed Aug 13, 2024
1 parent 5bcf313 commit a793fb3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 22 deletions.
16 changes: 0 additions & 16 deletions src/client/conn/http2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -363,22 +363,6 @@ where
self
}

/// Enables or disables server push promises.
///
/// This value is included in the initial SETTINGS handshake.
/// Setting this value to value to
/// false in the initial SETTINGS handshake guarantees that the remote server
/// will never send a push promise.
///
/// This setting can be changed during the life of a single HTTP/2
/// connection by sending another settings frame updating the value.
///
/// If not set, hyper will use a default.
pub fn enable_push(&mut self, enabled: impl Into<Option<bool>>) -> &mut Self {
self.h2_builder.enable_push = enabled.into();
self
}

/// Sets the maximum number of concurrent streams.
///
/// The maximum concurrent streams setting only controls the maximum number
Expand Down
8 changes: 2 additions & 6 deletions src/proto/h2/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ pub(crate) struct Config {
pub(crate) max_send_buffer_size: usize,
pub(crate) max_pending_accept_reset_streams: Option<usize>,
pub(crate) header_table_size: Option<u32>,
pub(crate) enable_push: Option<bool>,
pub(crate) max_concurrent_streams: Option<u32>,
}

Expand All @@ -97,7 +96,6 @@ impl Default for Config {
max_send_buffer_size: DEFAULT_MAX_SEND_BUF_SIZE,
max_pending_accept_reset_streams: None,
header_table_size: None,
enable_push: Some(false),
max_concurrent_streams: None,
}
}
Expand All @@ -110,10 +108,8 @@ fn new_builder(config: &Config) -> Builder {
.initial_window_size(config.initial_stream_window_size)
.initial_connection_window_size(config.initial_conn_window_size)
.max_header_list_size(config.max_header_list_size)
.max_send_buffer_size(config.max_send_buffer_size);
if let Some(enabled) = config.enable_push {
builder.enable_push(enabled);
}
.max_send_buffer_size(config.max_send_buffer_size)
.enable_push(false);
if let Some(max) = config.max_frame_size {
builder.max_frame_size(max);
}
Expand Down

0 comments on commit a793fb3

Please sign in to comment.