Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ as_conversions = "allow" # TODO: tricky
cast_possible_truncation = "allow" # TODO: consider
cast_precision_loss = "allow" # TODO: consider
checked_conversions = "allow"
collapsible_match = "allow"
else_if_without_else = "allow"
enum_glob_use = "allow"
float_arithmetic = "allow"
Expand Down
8 changes: 3 additions & 5 deletions src/proto/h1/conn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -676,11 +676,9 @@ where
Version::HTTP_10 => self.state.disable_keep_alive(),
// If response is version 1.1 and keep-alive is wanted, add
// Connection: keep-alive header when not present
Version::HTTP_11 => {
if self.state.wants_keep_alive() {
head.headers
.insert(CONNECTION, HeaderValue::from_static("keep-alive"));
}
Version::HTTP_11 if self.state.wants_keep_alive() => {
head.headers
.insert(CONNECTION, HeaderValue::from_static("keep-alive"));
}
_ => (),
}
Expand Down
Loading