Thank you! That fixed the issue. 

Might I suggest adding the below snippet into the "example" section of the 
errorfile documentation at [1]? The current example only shows the 
configuration itself but not what the file format should be - since it's this 
specific, the description given is just simply not enough for a casual proxy 
admin like myself to successfully configure it.

-----Original Message-----
From: Tim Düsterhus [mailto:[email protected]] 
Sent: Tuesday, June 12, 2018 2:22 PM
To: J. Casalino <[email protected]>; Cyril Bonté <[email protected]>
Cc: [email protected]
Subject: Re: HAProxy 1.8.x not serving errorfiles with H2

Hi

Am 12.06.2018 um 17:43 schrieb J. Casalino:
> Thank you so much for your response. [1] is the simplest example of our 503 
> errorfile. Based on what you're saying it sounds like we need to add some 
> additional information into the file. Is this documented somewhere?
> 

it is [1]:

> The files are returned verbatim on the TCP socket. This allows any 
> trick such as redirections to another URL or site, as well as tricks 
> to clean cookies, force enable or disable caching, etc... The package 
> provides default error files returning the same contents as default errors.

You need to prefix HTTP response headers. Something like this should work [2]:

> HTTP/1.0 503 Service Unavailable
> Cache-Control: no-cache
> Connection: close
> Content-Type: text/html

Best regards
Tim Düsterhus

[1]
https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#4.2-errorfile
[2]
http://git.haproxy.org/?p=haproxy.git;a=blob;f=examples/errorfiles/503.http;h=48fde5881e680857462c32cc305f9179af19091f;hb=HEAD

Reply via email to