accept requests using only linefeeds
This commit is contained in:
parent
331129fc06
commit
9f9130698b
1 changed files with 1 additions and 1 deletions
|
@ -65,7 +65,7 @@ fn handle_connection(mut stream: TcpStream) {
|
|||
println!("[{client_ip}] request over {MAX_REQUEST_SIZE} bytes, closing connection");
|
||||
return;
|
||||
}
|
||||
if buffer.ends_with(b"\r\n\r\n") {
|
||||
if buffer.ends_with(b"\r\n\r\n") || buffer.ends_with(b"\n\n") {
|
||||
let request = String::from_utf8_lossy(&buffer).to_string();
|
||||
|
||||
println!("[{client_ip}] received {} bytes", buffer.len());
|
||||
|
|
Loading…
Reference in a new issue