fix(client): prevent empty bodies sending transfer-encoding for GET, HEAD

This commit is contained in:
Sean McArthur
2018-02-16 15:22:06 -08:00
parent dd79a4a0e0
commit 77adab4ebf
2 changed files with 31 additions and 5 deletions

View File

@@ -234,6 +234,28 @@ test! {
body: None,
}
test! {
name: client_get_implicitly_empty,
server:
expected: "GET / HTTP/1.1\r\nHost: {addr}\r\n\r\n",
reply: REPLY_OK,
client:
request:
method: Get,
url: "http://{addr}/",
headers: [],
body: Some(""),
proxy: false,
response:
status: Ok,
headers: [
ContentLength(0),
],
body: None,
}
test! {
name: client_post_sized,