Skip to content

Commit

Permalink
fix test for 101 HTTP behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
Keksoj committed Sep 13, 2023
1 parent 31c26b4 commit 818bc48
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion e2e/src/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)");
Expand All @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion lib/src/protocol/kawa_h1/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down

0 comments on commit 818bc48

Please sign in to comment.