On Mon, May 22, 2017 at 07:08:13PM -0300, Joao Morais wrote:
> 
> > Em 17 de mai de 2017, à(s) 19:34, Bryan Talbot <bryan.tal...@playnext.com> 
> > escreveu:
> > 
> > 
> >> On May 15, 2017, at May 15, 6:35 PM, Joao Morais <l...@joaomorais.com.br> 
> >> wrote:
> >> 
> >>   errorfile 413 /usr/local/etc/haproxy/errors/413.http
> >>   http-request deny deny_status 413 if { req.body_size gt 10485760 }
> >> 
> >> ... HAProxy complains with:
> >> 
> >>   [WARNING] 135/001448 (27) : parsing [/etc/haproxy/haproxy.cfg:15] : 
> >> status code 413 not handled by 'errorfile', error customization will be 
> >> ignored.
> >>   [WARNING] 135/001448 (27) : parsing [/etc/haproxy/haproxy.cfg:89] : 
> >> status code 413 not handled, using default code 403.
> >> 
> >> How should I configure HAProxy in order to deny with 413?
> > 
> > 
> > You've already found it. AFAIK, that's the only way.
> 
> 
> =(
> 
> In my understanding I should only use a 400badreq.http like message on an
> errorfile 400 config line, otherwise if HAProxy need to issue a 400 status
> code, my 413 status code would be issued instead.
> 
> Is this a valid feature request or there are technical reasons why this has
> been done that way?

Bryan has already listed the other solution (use_backend). In general
we'd all like to have a "return" directive to return some contents, but
when you start to enumerate all the requirements, there are so many
different combinations that no work was ever started :-/

Willy

Reply via email to