title: HAProxy loses client certificate after close
body: <p>I set up HAProxy 1.5.14 to use client certificates. This works fine for a single request, but HAProxy seems to lose the client certificate after an HTTP close.</p>
  
  <p>From the haproxy.conf:</p>
  
  <pre><code>frontend localhost_https
      bind *:8443 ssl crt /etc/private/server.pem.key_and_cert no-sslv3 ca-file /etc/certs/client_ca.pem verify required
      option forceclose
      default_backend my_http
  </code></pre>
  
  <p>I'm using forceclose to reliably trigger an HTTP close. Calling curl now shows that the first request authenticates correctly, but the second request does not.</p>
  
  <pre><code>$ (curl --cert /tmp/client.pem https://localhost:8443/ https://localhost:8443/ -vk &gt; /dev/null) 2&gt;&amp;1|grep HTTP
  &gt; GET / HTTP/1.1
  &lt; HTTP/1.1 200 OK
  &gt; GET / HTTP/1.1
  &lt; HTTP/1.0 401 Unauthorized
  </code></pre>
  
  <p>Am I missing something? Why does HAProxy not send a request to the client to send the client certificate on the second request?</p>