reading the body causes an infinite loop
This commit is contained in:
@ -3,7 +3,7 @@ use std::{
|
||||
collections::HashMap,
|
||||
error::Error,
|
||||
fs::{self},
|
||||
io::{BufRead, BufReader, Read, Write},
|
||||
io::{BufRead, BufReader, Write},
|
||||
net::{TcpListener, TcpStream},
|
||||
path::PathBuf,
|
||||
process::exit,
|
||||
@ -408,9 +408,10 @@ fn handle_request(mut stream: TcpStream) -> Result<(), Box<dyn Error>> {
|
||||
return Ok(());
|
||||
}
|
||||
};
|
||||
dbg!(&field_lines);
|
||||
|
||||
let mut request_body: Vec<u8> = vec![];
|
||||
reader.read_to_end(&mut request_body)?;
|
||||
// let mut request_body: Vec<u8> = vec![];
|
||||
// reader.read_to_end(&mut request_body)?;
|
||||
|
||||
let response = match start_line.target.as_str() {
|
||||
// For docker healtcheck. If the server can properly respond, then it must be healthy.
|
||||
|
Reference in New Issue
Block a user