Haproxy removes the “Reason-Phrase” from the HTTP response status code.
I created a very basic php script to test this, the output is simply status code 400 with a reason phrase.
header(“HTTP/1.1 400 (The image exceeds the maximum width of 500px. Please adjust the image.)”);
When the request goes directly to the apache webserver I can see this using developer console in Chrome (Network -> Headers) and I get:
Status Code: 400 (The image exceeds the maximum width of 500px. Please adjust the image.)
When the Apache web server is proxied through Haproxy i get only the status code
Status Code: 400
So either there is a setting missing in my config to allow this or simply does not work. I have tried it on Haproxy 1.8, 1.9, 2.0 and 2.1 and I get the same problem.
Can anyone help?