Error redirect http to https

The following errors are happening:

01-https://www.xxx.com.br/

502 Bad Gateway
The server returned an invalid or incomplete response.

Jul 4 10:48:02 localhost haproxy [1066]: 10.69.39.9:27117 [04/Jul/2017:10:48:01.966] HTTPS-in ~ app-Main/zend02 18/0/0/-1/39 502 6116–PHNN 0/0/0/0/0 0/0 “get/HTTP/1.1”

02-Https://www.xxx.com.br/auth/login

Jul 4 10:48:51 localhost haproxy [1066]: 10.69.39.9:27135 [04/Jul/2017:10:48:51.124] HTTPS-in ~ app-Main/zend02 1/0/1/32/34 200 5461----nn 0/0/0/0/0 0/0 “get/auth/login HTTP/1.1”
Jul 4 10:48:51 localhost haproxy [1066]: 10.69.39.9:27136 [04/Jul/2017:10:48:51.225] HTTPS-in ~ app-Main/zend02 1/0/0/1/2 304 153----nn 2/2/1/1/0 0/0 “get/images/logos.png HTTP/1.1”
Jul 4 10:48:51 localhost haproxy [1066]: 10.69.39.9:27137 [04/Jul/2017:10:48:51.225] HTTPS-in ~ app-Main/zend02 1/0/1/1/3 304 152----nn 1/1/0/0/0 0/0 “get/images/logo_pug.png HTTP/1.1”

http://cbonte.github.io/haproxy-dconv/1.7/configuration.html#8.5

PH:
The proxy blocked the server’s response, because it was invalid,
incomplete, dangerous (cache control), or matched a security filter.
In any case, an HTTP 502 error is sent to the client. One possible
cause for this error is an invalid syntax in an HTTP header name
containing unauthorized characters. It is also possible but quite
rare, that the proxy blocked a chunked-encoding request from the
client due to an invalid syntax, before the server responded. In this
case, an HTTP 400 error is sent to the client and reported in the
logs.