Skip to content

Commit ebea09d

Browse files
committed
Fix spurious errors with networking tests.
1 parent 25dcec9 commit ebea09d

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

crates/cargo-test-support/src/registry.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -781,6 +781,7 @@ impl HttpServer {
781781
let buf = buf.get_mut();
782782
write!(buf, "HTTP/1.1 {}\r\n", response.code).unwrap();
783783
write!(buf, "Content-Length: {}\r\n", response.body.len()).unwrap();
784+
write!(buf, "Connection: close\r\n").unwrap();
784785
for header in response.headers {
785786
write!(buf, "{}\r\n", header).unwrap();
786787
}

tests/testsuite/publish.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1965,6 +1965,7 @@ Caused by:
19651965
headers:
19661966
<tab>HTTP/1.1 400
19671967
<tab>Content-Length: 7
1968+
<tab>Connection: close
19681969
<tab>
19691970
body:
19701971
go away

0 commit comments

Comments
 (0)