|
|
|
@ -323,9 +323,9 @@ async fn test_handle_connection() {
|
|
|
|
|
write_data: Vec::new(),
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// let mut buf = [0u8; 1024];
|
|
|
|
|
// stream.read(&mut buf).await.unwrap();
|
|
|
|
|
handle_connection(&mut stream).await;
|
|
|
|
|
let mut buf = [0u8; 1024];
|
|
|
|
|
stream.read(&mut buf).await.unwrap();
|
|
|
|
|
|
|
|
|
|
let expected_contents = fs::read_to_string("hello.html").unwrap();
|
|
|
|
|
let expected_response = format!("HTTP/1.1 200 OK\r\n\r\n{}", expected_contents);
|
|
|
|
|