The errorfile directive configures static responses, including all of their
headers (also static), to be returned instead of the built-in response...
but the 401 response isn't static; it includes the WWW-Authenticate header,
which varies, at minimum, with the realm.
Docs indicate that "errorfile" is supported for codes 200, 400, 403, 408,
500, 502, 503, and 504.
Status code not handled... by the errorfile directive.
http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#4-errorfile
On Sep 26, 2015 9:41 AM, "Guido Dolci" <dolci@sfera.net> wrote:
> Hello,
>
> using this directive
>
> errorfile 401 /bla/blabla
>
> along with
>
> http-request auth realm xxx if yyy
>
> unexpectedly gives:
>
> [WARNING] 267/183210 (15026) : parsing [/etc/haproxy/haproxy.cfg:nn] :
> status code 401 not handled, error customization will be ignored.
>
> which actually is incorrect since the 401 IS actually handled by haproxy...
>
> cheers
>
> Guido
>
headers (also static), to be returned instead of the built-in response...
but the 401 response isn't static; it includes the WWW-Authenticate header,
which varies, at minimum, with the realm.
Docs indicate that "errorfile" is supported for codes 200, 400, 403, 408,
500, 502, 503, and 504.
Status code not handled... by the errorfile directive.
http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#4-errorfile
On Sep 26, 2015 9:41 AM, "Guido Dolci" <dolci@sfera.net> wrote:
> Hello,
>
> using this directive
>
> errorfile 401 /bla/blabla
>
> along with
>
> http-request auth realm xxx if yyy
>
> unexpectedly gives:
>
> [WARNING] 267/183210 (15026) : parsing [/etc/haproxy/haproxy.cfg:nn] :
> status code 401 not handled, error customization will be ignored.
>
> which actually is incorrect since the 401 IS actually handled by haproxy...
>
> cheers
>
> Guido
>