Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ fn handle_connection(mut stream: TcpStream, verbose: bool) -> Result<(), anyhow:
// empty line, which indicates the end of the request headers and possible start
// of the body.
loop {
let mut line = String::new();
buf_reader.read_line(&mut line)?;
let mut line = Vec::new();
buf_reader.read_until(0xa, &mut line)?;
let line = String::from_utf8_lossy(&line);
let trimmed_line = line.trim();
if trimmed_line.is_empty() {
break;
Expand Down
Loading