Welcome! Log In Create A New Profile

Advanced

Re: [PATCH] limit_req_status: allow status response to be as low as 200

Christopher Liebman
January 13, 2023 07:54AM
Thanks!

On Thu, Jan 12, 2023 at 1:36 PM J Carter <jordanc.carter@outlook.com> wrote:

> It's trivial to do with error page OP as mentioned - an example:
>
> limit_req_status 598;
> limit_req_zone $binary_remote_addr zone=a:1m rate=1r/m;
>
> server {
> limit_req zone=a nodelay;
>
> error_page 598 = @send-204;
>
> location / {
> ...
> }
>
> ...
>
> location @send-204 {
> return 204;
> }
> }
>
> error_page's '=' can also be set to 204, and the named location contain
> nothing at all (whatever you prefer).
>
> On 12/01/2023 17:11, Maxim Dounin wrote:
> > Hello!
> >
> > On Thu, Jan 12, 2023 at 05:16:21AM -0800, Christopher Liebman wrote:
> >
> >> Not with 204.
> >> This works quite well with a partner that has an aversion to errors when
> >> they run over the limit:
> >> limit_req_status 204;
> > Indeed, 204 happens to be one of the two 2xx codes which can be
> > returned directly, as they are handled in
> > ngx_http_finalize_request() to facilitate simpler
> > code in the dav module. This is not what your patch enables
> > though. For all other codes, except 204 and 201 mentioned above,
> > just returning them will simply break things.
> >
> > As already suggested, proper behaviour for all the codes can be
> > easily configured by using the "error_page" directive.
> >
> > Hope this helps.
> >
> _______________________________________________
> nginx-devel mailing list
> nginx-devel@nginx.org
> https://mailman.nginx.org/mailman/listinfo/nginx-devel
>
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] limit_req_status: allow status response to be as low as 200

Christopher Liebman 623 January 09, 2023 12:46PM

Re: [PATCH] limit_req_status: allow status response to be as low as 200

Maxim Dounin 167 January 11, 2023 03:24PM

Re: [PATCH] limit_req_status: allow status response to be as low as 200

Christopher Liebman 158 January 12, 2023 08:18AM

Re: [PATCH] limit_req_status: allow status response to be as low as 200

Maxim Dounin 173 January 12, 2023 12:12PM

Re: [PATCH] limit_req_status: allow status response to be as low as 200

J Carter 230 January 12, 2023 04:38PM

Re: [PATCH] limit_req_status: allow status response to be as low as 200

Christopher Liebman 278 January 13, 2023 07:54AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 172
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready