Fix spurious errors with networking tests.

This commit is contained in:
Eric Huss 2023-09-22 13:37:26 -07:00
parent 25dcec9f43
commit ebea09d8f4
2 changed files with 2 additions and 0 deletions

View file

@ -781,6 +781,7 @@ impl HttpServer {
let buf = buf.get_mut();
write!(buf, "HTTP/1.1 {}\r\n", response.code).unwrap();
write!(buf, "Content-Length: {}\r\n", response.body.len()).unwrap();
write!(buf, "Connection: close\r\n").unwrap();
for header in response.headers {
write!(buf, "{}\r\n", header).unwrap();
}

View file

@ -1965,6 +1965,7 @@ Caused by:
headers:
<tab>HTTP/1.1 400
<tab>Content-Length: 7
<tab>Connection: close
<tab>
body:
go away