diff --git a/lib/src/https.rs b/lib/src/https.rs index 76de96c60..98e4ea99e 100644 --- a/lib/src/https.rs +++ b/lib/src/https.rs @@ -466,10 +466,8 @@ impl ProxySession for HttpsSession { match self.state.marker() { StateMarker::Expect => incr!("https.upgrade.expect.failed"), StateMarker::Handshake => incr!("https.upgrade.handshake.failed"), - StateMarker::Http => incr!("https.upgrade.http.failed"), StateMarker::WebSocket => incr!("https.upgrade.wss.failed"), - StateMarker::Http2 => incr!("https.upgrade.http2.failed"), - StateMarker::Mux => incr!("https.upgrade.mux.failed"), + StateMarker::Mux => incr!("https.upgrade.http.failed"), } return; } diff --git a/lib/src/protocol/mux/h1.rs b/lib/src/protocol/mux/h1.rs index 0ed80a03f..822bcaa36 100644 --- a/lib/src/protocol/mux/h1.rs +++ b/lib/src/protocol/mux/h1.rs @@ -49,7 +49,7 @@ impl ConnectionH1 { return MuxResult::Continue; } - let was_initial = kawa.is_initial(); + let was_main_phase = kawa.is_main_phase(); kawa::h1::parse(kawa, parts.context); debug_kawa(kawa); if kawa.is_error() { @@ -80,7 +80,7 @@ impl ConnectionH1 { } match self.position { Position::Server => { - if was_initial { + if !was_main_phase { self.requests += 1; println_!("REQUESTS: {}", self.requests); stream.state = StreamState::Link diff --git a/lib/src/protocol/mux/mod.rs b/lib/src/protocol/mux/mod.rs index 618f2c86a..48c9afa64 100644 --- a/lib/src/protocol/mux/mod.rs +++ b/lib/src/protocol/mux/mod.rs @@ -1,7 +1,7 @@ use std::{ cell::RefCell, collections::HashMap, - io::{ErrorKind, Write}, + io::ErrorKind, net::{Shutdown, SocketAddr}, rc::{Rc, Weak}, }; diff --git a/lib/src/router/mod.rs b/lib/src/router/mod.rs index 7cd066c76..9a8fd594a 100644 --- a/lib/src/router/mod.rs +++ b/lib/src/router/mod.rs @@ -937,7 +937,7 @@ mod tests { ), Ok(Route::Cluster { id: "examplewildcard".to_string(), - h2: true + h2: false }) ); assert_eq!(