Skip to content

Commit 72429dc

Browse files
committed
7th stage: fix content-type
1 parent 54318d3 commit 72429dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ fn handle_connection(mut stream: TcpStream, path: Option<PathBuf>) -> Result<(),
9494
let file_path = path.join(&req.path[7..]);
9595

9696
match std::fs::read_to_string(file_path) {
97-
Ok(file) => send_text_content(&mut stream, &file)?,
97+
Ok(file) => send_content(&mut stream, "application/octet-stream", &file)?,
9898
Err(_) => not_found(&mut stream)?,
9999
}
100100
} else if req.path == "/user-agent" {

0 commit comments

Comments
 (0)