fix(client): don't read extra bytes on idle connections

This commit is contained in:
Sean McArthur
2017-10-27 10:26:59 -07:00
parent f7532b71d1
commit 7c4b814e6b
4 changed files with 77 additions and 17 deletions

View File

@@ -353,6 +353,38 @@ test! {
body: None,
}
test! {
name: client_pipeline_responses_extra,
server:
expected: "\
GET /pipe HTTP/1.1\r\n\
Host: {addr}\r\n\
\r\n\
",
reply: "\
HTTP/1.1 200 OK\r\n\
Content-Length: 0\r\n\
\r\n\
HTTP/1.1 200 OK\r\n\
Content-Length: 0\r\n\
\r\n\
",
client:
request:
method: Get,
url: "http://{addr}/pipe",
headers: [],
body: None,
proxy: false,
response:
status: Ok,
headers: [],
body: None,
}
test! {
name: client_error_unexpected_eof,