title: Internet explorer connection is lost after 1 minute when using haproxy in between
body: <p>I have an angular client that calls a rest service deployed on an application server. Between the two stands a haproxy that forwards the requests coming from the client to the REST service. When using Internet explorer and the response time is greater than 1 minute, when the REST service returns, the response is not sent to the client. The client still waits for the response. </p>
  
  <p>This seems to be a haproxy issue since when bypassing haproxy, the request returns as expected after ~3-4 minutes. 
  I have tried all the different timeouts (client, server, http-request) but nothing seems to solve this.</p>
  
  <p>My haproxy configuration can be found below:</p>
  
  <pre><code>global
      log /dev/log    local0
      #log /dev/log    local1 notice
      #chroot /var/lib/haproxy
      #stats socket /run/haproxy/admin.sock mode 660 level admin
      stats timeout 30s
      maxconn 2000
      user haproxy
      group haproxy
      daemon
  
      # Default SSL material locations
      ca-base /etc/ssl/certs
      crt-base /etc/ssl/private
  
      tune.maxrewrite 1024
      tune.bufsize 32768
  
      # Default ciphers to use on SSL-enabled listening sockets.
      # For more information, see ciphers(1SSL). This list is from:
      #  https://hynek.me/articles/hardening-your-web-servers-ssl-ciphers/
      # An alternative list with additional directives can be obtained from
      #  https://mozilla.github.io/server-side-tls/ssl-config-generator/?server=haproxy
      ssl-default-bind-ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:!aNULL:!MD5:!DSS
      ssl-default-bind-options no-sslv3
  
  
  defaults
      log     global
      mode    http
      option  httplog
      option  dontlognull
      option  log-separate-errors
      option redispatch
      retries 3
      timeout connect 5000
      timeout client  1200s
      timeout server  1200s
      errorfile 400 /var/log/haproxy/errors/400.http
      errorfile 403 /var/log/haproxy/errors/403.http
      errorfile 408 /var/log/haproxy/errors/408.http
      errorfile 500 /var/log/haproxy/errors/500.http
      errorfile 502 /var/log/haproxy/errors/502.http
      errorfile 503 /var/log/haproxy/errors/503.http
      errorfile 504 /var/log/haproxy/errors/504.http
  
  listen haproxy-monitoring
      bind *:1900
      mode http
      stats enable                                        # Enable satistics
      stats uri /haproxy?stats                            # Dashboard URL
      stats realm Strictly\ Private
      stats auth haproxyanalytics:haproxyanalytics              # Username / Password
      stats hide-version                                  # Hide the version of HAProxy used
  
  
  
  
  # APACHE web servers
      #frontend haproxy-apache
      #    bind *:8001 transparent
      #    mode http
      #    default_backend apache-nodes
  
  frontend http-in
      bind *:80 transparent
      acl has_special_uri path_beg /cxf
      use_backend rest-service if has_special_uri
      default_backend apache-web
  
  backend apache-web
      mode http
      balance roundrobin
      option forwardfor                                               # ensures the forwarded request includes the actual client IP address
      option httpclose
      http-request set-header X-Forwarded-Port %[dst_port]
      http-request add-header X-Forwarded-Proto https if { ssl_fc }
      #option httpchk HEAD / HTTP/1.1\r\nHost:localhost                # defines the check HAProxy uses to test if a web server is still valid for forwarding requests
      server "apache-1" ${CURRENT_NODE_IP}:${APACHE_PORT} check
  
  
  backend rest-service
      mode http
      balance roundrobin
      option forwardfor                                               # ensures the forwarded request includes the actual client IP address
      option httpclose
      option accept-invalid-http-request
      http-request set-header X-Forwarded-Port %[dst_port]
      http-request add-header X-Forwarded-Proto https if { ssl_fc }
      #option httpchk HEAD / HTTP/1.1\r\nHost:localhost                # defines the check HAProxy uses to test if a web server is still valid for forwarding requests
      server "karaf-1" ${CURRENT_NODE_IP}:${KARAF_REST_PORT} check
  </code></pre>