[PATCH]add new http status code
Maxim Dounin
mdounin at mdounin.ru
Wed May 9 11:07:36 UTC 2012
Hello!
On Tue, May 08, 2012 at 11:24:33PM +0200, Manlio Perillo wrote:
> Il 08/05/2012 21:39, Maxim Dounin ha scritto:
> > [...]
> >> Blew is patch(for Nginx trunk) to use 429 replace 400 when request header
> >> is too large,
> >> and use 431 replace 503 when find too many request(limit_req module). in
> >> addition to add new http status code 511.
> >
> > There are no plans to replace returned status codes in near
> > future, at least not before we have clear understanding of effects
> > of new codes on behaviour of various clients.
> >
> > And in case of limit_req/limit_conn this might happen at all due
> > to compatibility reasons: there are lots of configs out there
> > which expect 503 to be returned.
> >
>
> For limit_req/limit_conn this should not be a problem, since the error
> code to return can be made configurable.
It can be, but I'm not sure there are benefits (and the default
should be kept the same anyway). If one wants to return any
specific code, error_page might be used to change the code.
Moreover, use of 429 in case of non-client-specific limits (that
is, even if you use $remote_addr for limiting as NATs are common,
not even talking about resource-specific limits, e.g. based on
$server_name) looks flawed for me from standards point of view, as
the status should be really 5xx, not 4xx.
Maxim Dounin
More information about the nginx-devel
mailing list