diff --git a/lib/src/protocol/kawa_h1/mod.rs b/lib/src/protocol/kawa_h1/mod.rs index 50eac5b2c..564780576 100644 --- a/lib/src/protocol/kawa_h1/mod.rs +++ b/lib/src/protocol/kawa_h1/mod.rs @@ -476,8 +476,6 @@ impl Http Http (), } + let response_length_known = self.response_stream.body_size != kawa::BodySize::Empty; + let request_length_known = self.request_stream.body_size != kawa::BodySize::Empty; if !(self.request_stream.is_terminated() && self.request_stream.is_completed()) - && self.request_stream.body_size != kawa::BodySize::Empty + && request_length_known { error!("Response terminated before request, this case is not handled properly yet"); incr!("http.early_response_close"); @@ -519,20 +519,22 @@ impl Http { + (true, true, true) => { debug!("{} keep alive front/back", self.log_context()); self.reset(); StateResult::Continue } - (true, false) => { + (true, false, true) => { debug!("{} keep alive front", self.log_context()); self.reset(); StateResult::CloseBackend @@ -848,6 +850,7 @@ impl Http Http