2

Haproxy is terminating https connections and forwards requests to backend. When resource returns 204 No-Content and Transfer-Encoding: chunked the curl connection is not closed. When I call resource directly on backend, the connection is closed properly. Can anybody explain this behaviour? Is this something specific to haproxy or curl or is it expected?

Through 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

Directly backend:

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.