Hi,

"option accept-invalid-http-response"

was the solution.

Regards,
Florian

On 14.01.2014 17:31, Florian Engelmann wrote:
Hi,

we are using HAProxy 1.5-dev21 as loadbalancer frontend and some NGINX
1.4 servers as backend. Everything is working perfect. Great piece of
software!

One question:
If some client sends a request like:

GET something.someone

This request is forwarded to the backends even if it is not a valid
request. The backend (NGINX) replies with an error page 400 (Bad
Request). This is an invalid response to HAProxy which will deliver a
502 (Bad Gateway) error to the client.

Response to client:
2014-01-14T15:17:04+01:00 somehostname haproxy[99999]:
xxx.1xx.2xx.xx:50294 [14/Jan/2014:15:17:04.648] application8089
application8089/somehostname.some.domain 0/0/0/-1/1 502 370 - - PH--
475/441/8/0/0 0/0 \"GET usacording.com HTTP/1.0\"

HAProxy error:
[14/Jan/2014:16:52:07.357] backend application8089 (#11) : invalid response
   frontend application8089 (#11), server somehostname.some.domain (#2),
event #2211
   src xxx.1xx.2xx.xx:55112, session #2141081, session flags 0x0000048e
   HTTP msg state 26, msg flags 0x00000000, tx flags 0x08300000
   HTTP chunk len 0 bytes, HTTP body len 0 bytes
   buffer flags 0x00008023, out 0 bytes, total 166 bytes
   pending 166 bytes, wrapping at 16384, error at position 0:

   00000  <html>\r\n
   00008  <head><title>400 Bad Request</title></head>\r\n
   00053  <body bgcolor="white">\r\n
   00077  <center><h1>400 Bad Request</h1></center>\r\n
   00120  <hr><center>nginx</center>\r\n
   00148  </body>\r\n
   00157  </html>\r\n

Is it possible to respond the original error (400) to the client?

Regards,
Florian



Reply via email to