Skip to content

Commit 063b6ba

Browse files
committed
reduce buffer size
1 parent d74f73d commit 063b6ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/server.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ impl Server {
3737
// request handler
3838
async fn handle(inbound: TcpStream, hosts: HashMap<String, String>) -> Result<(), Box<dyn Error>> {
3939
// buffer init
40-
let mut buf = vec![0; 1024];
41-
let mut headers = [httparse::EMPTY_HEADER; 16];
40+
let mut buf = vec![0; 512];
41+
let mut headers = [httparse::EMPTY_HEADER; 8];
4242
let mut r = httparse::Request::new(&mut headers);
4343

4444
// parse request

0 commit comments

Comments
 (0)