Re: HTTP 429 Too Many Requests (tarpit deny_status)

2017-03-14 Thread Willy Tarreau
Hi Jarno, On Mon, Mar 06, 2017 at 04:15:00PM +0200, Jarno Huuskonen wrote: > Hi Willy, > > On Fri, Feb 10, Willy Tarreau wrote: > > > How should I send the patches ? One commit for > > > http_server_error/http_get_status_idx changes and tarpit deny_status > > > parser / doc in another commit ? >

Re: HTTP 429 Too Many Requests (tarpit deny_status)

2017-03-06 Thread Jarno Huuskonen
Hi Willy, On Fri, Feb 10, Willy Tarreau wrote: > > How should I send the patches ? One commit for > > http_server_error/http_get_status_idx changes and tarpit deny_status > > parser / doc in another commit ? > > Yes that's the prefered way to do it, one commit per architecture or > functional

Re: HTTP 429 Too Many Requests (tarpit deny_status)

2017-02-13 Thread Willy Tarreau
Hi Jarno, On Sat, Feb 11, 2017 at 12:11:47PM +0200, Jarno Huuskonen wrote: > > I think there's a problem in http_error_message(), there were some > > conditions to detect certain error cases on reused connections for > > which we had to remain silent and these conditions have disappeared > > so

Re: HTTP 429 Too Many Requests (tarpit deny_status)

2017-02-11 Thread Jarno Huuskonen
Hi, On Fri, Feb 10, Willy Tarreau wrote: > On Mon, Feb 06, 2017 at 04:33:01PM +0200, Jarno Huuskonen wrote: > > Hi, > > > > On Mon, Jan 16, Willy Tarreau wrote: > > > > The second patch updates http_process_req_common/http_process_tarpit to > > > > use deny_status. http_process_tarpit has a

Re: HTTP 429 Too Many Requests (tarpit deny_status)

2017-02-09 Thread Willy Tarreau
Hi Jarno, On Mon, Feb 06, 2017 at 04:33:01PM +0200, Jarno Huuskonen wrote: > Hi, > > On Mon, Jan 16, Willy Tarreau wrote: > > > The second patch updates http_process_req_common/http_process_tarpit to > > > use deny_status. http_process_tarpit has a switch statement for mapping > > > txn->status

Re: HTTP 429 Too Many Requests (tarpit deny_status)

2017-02-06 Thread Jarno Huuskonen
Hi, On Mon, Jan 16, Willy Tarreau wrote: > > The second patch updates http_process_req_common/http_process_tarpit to > > use deny_status. http_process_tarpit has a switch statement for mapping > > txn->status (200<->504) to HTTP_ERR_(enum). Is this reasonable ? > > Yes it's reasonable however it

Re: HTTP 429 Too Many Requests (tarpit deny_status)

2017-02-01 Thread Willy Tarreau
Hi Jarno, On Wed, Feb 01, 2017 at 07:52:57PM +0200, Jarno Huuskonen wrote: > Does it make sense to try to optimize the switch statement > and have most common status codes at the top ? Something like > switch(txn->status) { > case 500: > http_err_code_idx =

Re: HTTP 429 Too Many Requests (tarpit deny_status)

2017-02-01 Thread Jarno Huuskonen
Hi Willy, On Mon, Jan 16, Willy Tarreau wrote: > On Fri, Jan 13, 2017 at 07:28:38PM +0200, Jarno Huuskonen wrote: > > This is my first attempt in adding deny_status to: > > http-request tarpit [deny_status ] > > > > First patch updates parse_http_req_cond so config parser accepts > >

Re: HTTP 429 Too Many Requests (tarpit deny_status)

2017-01-16 Thread Willy Tarreau
Hi Jarno, On Fri, Jan 13, 2017 at 07:28:38PM +0200, Jarno Huuskonen wrote: > This is my first attempt in adding deny_status to: > http-request tarpit [deny_status ] > > First patch updates parse_http_req_cond so config parser accepts > [deny_status ] for http-request tarpit (and sets >

Re: HTTP 429 Too Many Requests (tarpit deny_status)

2017-01-13 Thread Jarno Huuskonen
Hello, On Fri, Jun 24, James Brown wrote: > +1 I am also using a fake backend with no servers and a 503 errorfile, and > it confuses everybody who looks at the config or the metrics. Being able to > directly emit a 429 would be fantastic. This is my first attempt in adding deny_status to: