Solution 1:

Your Cache-Control reaponse header is malformed. The values are separared with a comma (and optional whitespace included by convention) -- not a semicolon.

http-response set-header Cache-Control "public, max-age=31536000"

The quotes are absorbed by the HAProxy parser. Also valid:

(no space)

http-response set-header Cache-Control public,max-age=31536000

(space escaped)

http-response set-header Cache-Control public,\ max-age=31536000

There should normally be no need to add Content-Length in the proxy. If your origin server isn't automatically setting either Content-Length or Transfer-Encoding in the response, then your server should be fixed, upgraded, or replaced.