204无内容和传输编码时curl不closures:通过haproxy进行分块

Haproxy正在终止https连接并将请求转发到后端。 当资源返回204无内容和传输编码:分块curl连接不closures。 当我在后端直接调用资源时,连接已经正确closures。 有人可以解释这种行为吗? 这是特定的haproxy或curl或预期?

通过haproxy:

curl -X GET https://localhost/example -v * About to connect() to localhost port 443 (#0) * Trying 127.0.0.1... * Connected to localhost (127.0.0.1) port 443 (#0) > GET /example HTTP/1.1 > User-Agent: curl/7.29.0 > Host: localhost > Accept: */* > < HTTP/1.1 204 No Content < Cache-Control: no-cache, no-store, must-revalidate < Date: Wed, 23 Aug 2017 13:15:16 GMT < transfer-encoding: chunked < ^C 

直接后端:

 curl -X GET http://localhost:6083/example -v * About to connect() to localhost port 6083 (#0) * Trying 127.0.0.1... * Connected to localhost (127.0.0.1) port 6083 (#0) > GET /example HTTP/1.1 > User-Agent: curl/7.29.0 > Host: localhost:6083 > Accept: */* > < HTTP/1.1 204 No Content < Cache-Control: no-cache, no-store, must-revalidate < Date: Wed, 23 Aug 2017 14:19:03 GMT < transfer-encoding: chunked < * Connection #0 to host localhost left intact