Skip to content

Commit

Permalink
Fix spurious errors with networking tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Sep 22, 2023
1 parent 25dcec9 commit ebea09d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/cargo-test-support/src/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
1 change: 1 addition & 0 deletions tests/testsuite/publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1965,6 +1965,7 @@ Caused by:
headers:
<tab>HTTP/1.1 400
<tab>Content-Length: 7
<tab>Connection: close
<tab>
body:
go away
Expand Down

0 comments on commit ebea09d

Please sign in to comment.