diff --git a/e2e/src/tests/tests.rs b/e2e/src/tests/tests.rs index ab4e0514e..46a9da079 100644 --- a/e2e/src/tests/tests.rs +++ b/e2e/src/tests/tests.rs @@ -814,7 +814,7 @@ fn try_http_behaviors() -> State { let mut backend = SyncBackend::new( "backend", back_address, - "HTTP/1.1 101 Switching Protocols\r\nConnection: Upgrade\r\nUpgrade: WebSocket\r\nTransfer-Encoding: Chunked\r\n\r\nearly", + "HTTP/1.1 101 Switching Protocols\r\nConnection: Upgrade\r\nUpgrade: WebSocket\r\nTransfer-Encoding: Chunked\r\n\r\n", ); info!("expecting upgrade (101 switching protocols)"); @@ -832,6 +832,9 @@ fn try_http_behaviors() -> State { println!("request: {request:?}"); println!("response: {response:?}"); assert!(response.starts_with(&expected_response_start)); + + backend.set_response("early"); + backend.send(0); let expected_response = String::from("early"); let response = client.receive(); assert_eq!(response, Some(expected_response)); diff --git a/lib/src/protocol/kawa_h1/mod.rs b/lib/src/protocol/kawa_h1/mod.rs index b148d2c12..d8ed31678 100644 --- a/lib/src/protocol/kawa_h1/mod.rs +++ b/lib/src/protocol/kawa_h1/mod.rs @@ -10,7 +10,7 @@ use std::{ }; use kawa; -use mio::{net::TcpStream, Token, Interest}; +use mio::{net::TcpStream, Interest, Token}; use rusty_ulid::Ulid; use time::{Duration, Instant};