mirror of
https://github.com/KaiserY/trpl-zh-cn
synced 2025-04-06 11:48:03 +08:00
fix ch20-web-server/listing-20-06/src code error
This commit is contained in:
parent
9d3c4e217b
commit
a4d67c2354
@ -22,7 +22,7 @@ fn handle_connection(mut stream: TcpStream) {
|
||||
|
||||
let get = b"GET / HTTP/1.1\r\n";
|
||||
|
||||
if buffer.starts_with(get) {
|
||||
if buffer.starts_with("GET".as_bytes()) {
|
||||
let contents = fs::read_to_string("hello.html").unwrap();
|
||||
|
||||
let response = format!(
|
||||
|
Loading…
Reference in New Issue
Block a user