Merge pull request #1545 from ijustlearn/patch-1

删除多余代码
main
Sunface 1 week ago committed by GitHub
commit 92d9894599
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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);

Loading…
Cancel
Save