mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
Fix spurious errors with networking tests.
This commit is contained in:
parent
25dcec9f43
commit
ebea09d8f4
@ -781,6 +781,7 @@ impl HttpServer {
|
|||||||
let buf = buf.get_mut();
|
let buf = buf.get_mut();
|
||||||
write!(buf, "HTTP/1.1 {}\r\n", response.code).unwrap();
|
write!(buf, "HTTP/1.1 {}\r\n", response.code).unwrap();
|
||||||
write!(buf, "Content-Length: {}\r\n", response.body.len()).unwrap();
|
write!(buf, "Content-Length: {}\r\n", response.body.len()).unwrap();
|
||||||
|
write!(buf, "Connection: close\r\n").unwrap();
|
||||||
for header in response.headers {
|
for header in response.headers {
|
||||||
write!(buf, "{}\r\n", header).unwrap();
|
write!(buf, "{}\r\n", header).unwrap();
|
||||||
}
|
}
|
||||||
|
@ -1965,6 +1965,7 @@ Caused by:
|
|||||||
headers:
|
headers:
|
||||||
<tab>HTTP/1.1 400
|
<tab>HTTP/1.1 400
|
||||||
<tab>Content-Length: 7
|
<tab>Content-Length: 7
|
||||||
|
<tab>Connection: close
|
||||||
<tab>
|
<tab>
|
||||||
body:
|
body:
|
||||||
go away
|
go away
|
||||||
|
Loading…
x
Reference in New Issue
Block a user