From fooinha at gmail.com Sat Apr 1 15:50:35 2017 From: fooinha at gmail.com (Paulo Pacheco) Date: Sat, 1 Apr 2017 16:50:35 +0100 Subject: ngx_escape_json: fixes missing len increment for non escapable json chars when dst NULL Message-ID: # HG changeset patch # User Paulo Pacheco # Date 1491061541 0 # Sat Apr 01 15:45:41 2017 +0000 # Node ID bc97af7bf9eb3def877f5ebaecf4fd8a277108d0 # Parent 28dc369899ea77b03fab44d8878b273d28f06437 ngx_string: fixes len increment for non escapable json chars diff -r 28dc369899ea -r bc97af7bf9eb src/core/ngx_string.c --- a/src/core/ngx_string.c Sun Mar 26 01:25:01 2017 -0700 +++ b/src/core/ngx_string.c Sat Apr 01 15:45:41 2017 +0000 @@ -1811,6 +1811,8 @@ len += sizeof("\\u001F") - 2; } + len++; + size--; } ------------------------ CUT HERE ------------------------ Obrigado | Thanx | ??? Paulo Pacheco | ????? ?????? From vbart at nginx.com Sat Apr 1 16:30:51 2017 From: vbart at nginx.com (Valentin V. Bartenev) Date: Sat, 01 Apr 2017 19:30:51 +0300 Subject: ngx_escape_json: fixes missing len increment for non escapable json chars when dst NULL In-Reply-To: References: Message-ID: <5791655.3SSMLGQG4m@vbart-laptop> On Saturday 01 April 2017 16:50:35 Paulo Pacheco wrote: > # HG changeset patch > # User Paulo Pacheco > # Date 1491061541 0 > # Sat Apr 01 15:45:41 2017 +0000 > # Node ID bc97af7bf9eb3def877f5ebaecf4fd8a277108d0 > # Parent 28dc369899ea77b03fab44d8878b273d28f06437 > ngx_string: fixes len increment for non escapable json chars > > diff -r 28dc369899ea -r bc97af7bf9eb src/core/ngx_string.c > --- a/src/core/ngx_string.c Sun Mar 26 01:25:01 2017 -0700 > +++ b/src/core/ngx_string.c Sat Apr 01 15:45:41 2017 +0000 > @@ -1811,6 +1811,8 @@ > len += sizeof("\\u001F") - 2; > } > > + len++; > + > size--; > } > > [..] The function counts additional escape chars, not normal one. If it returns zero, then no escaping needed. wbr, Valentin V. Bartenev From mdounin at mdounin.ru Sun Apr 2 13:28:03 2017 From: mdounin at mdounin.ru (Maxim Dounin) Date: Sun, 02 Apr 2017 13:28:03 +0000 Subject: [nginx] Limit req: fixed delaying subrequests. Message-ID: details: http://hg.nginx.org/nginx/rev/7fcf209d40c8 branches: changeset: 6959:7fcf209d40c8 user: Maxim Dounin date: Sun Apr 02 14:32:26 2017 +0300 description: Limit req: fixed delaying subrequests. Since limit_req uses connection's write event to delay request processing, it can conflict with timers in other subrequests. In particular, even if applied to an active subrequest, it can break things if wev->delayed is already set (due to limit_rate or sendfile_max_chunk), since after limit_req finishes the wev->delayed flag will be set and no timer will be active. Fix is to use the wev->delayed flag in limit_req as well. This ensures that wev->delayed won't be set after limit_req finishes, and also ensures that limit_req's timers will be properly handled by other subrequests if the one delayed by limit_req is not active. diffstat: src/http/modules/ngx_http_limit_req_module.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diffs (29 lines): diff --git a/src/http/modules/ngx_http_limit_req_module.c b/src/http/modules/ngx_http_limit_req_module.c --- a/src/http/modules/ngx_http_limit_req_module.c +++ b/src/http/modules/ngx_http_limit_req_module.c @@ -276,6 +276,8 @@ ngx_http_limit_req_handler(ngx_http_requ r->read_event_handler = ngx_http_test_reading; r->write_event_handler = ngx_http_limit_req_delay; + + r->connection->write->delayed = 1; ngx_add_timer(r->connection->write, delay); return NGX_AGAIN; @@ -292,7 +294,7 @@ ngx_http_limit_req_delay(ngx_http_reques wev = r->connection->write; - if (!wev->timedout) { + if (wev->delayed && !wev->timedout) { if (ngx_handle_write_event(wev, 0) != NGX_OK) { ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); @@ -301,6 +303,7 @@ ngx_http_limit_req_delay(ngx_http_reques return; } + wev->delayed = 0; wev->timedout = 0; if (ngx_handle_read_event(r->connection->read, 0) != NGX_OK) { From mdounin at mdounin.ru Sun Apr 2 13:28:07 2017 From: mdounin at mdounin.ru (Maxim Dounin) Date: Sun, 02 Apr 2017 13:28:07 +0000 Subject: [nginx] Perl: fixed delaying subrequests. Message-ID: details: http://hg.nginx.org/nginx/rev/1c5e5e5b008d branches: changeset: 6960:1c5e5e5b008d user: Maxim Dounin date: Sun Apr 02 14:32:28 2017 +0300 description: Perl: fixed delaying subrequests. Much like in limit_req, use the wev->delayed flag to ensure proper handling and interoperability with limit_rate. diffstat: src/http/modules/perl/nginx.xs | 1 + src/http/modules/perl/ngx_http_perl_module.c | 16 ++++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diffs (40 lines): diff --git a/src/http/modules/perl/nginx.xs b/src/http/modules/perl/nginx.xs --- a/src/http/modules/perl/nginx.xs +++ b/src/http/modules/perl/nginx.xs @@ -1001,6 +1001,7 @@ sleep(r, sleep, next) ctx->next = SvRV(ST(2)); + r->connection->write->delayed = 1; ngx_add_timer(r->connection->write, sleep); r->write_event_handler = ngx_http_perl_sleep_handler; diff --git a/src/http/modules/perl/ngx_http_perl_module.c b/src/http/modules/perl/ngx_http_perl_module.c --- a/src/http/modules/perl/ngx_http_perl_module.c +++ b/src/http/modules/perl/ngx_http_perl_module.c @@ -278,15 +278,19 @@ ngx_http_perl_sleep_handler(ngx_http_req wev = r->connection->write; - if (wev->timedout) { - wev->timedout = 0; - ngx_http_perl_handle_request(r); + if (wev->delayed && !wev->timedout) { + + if (ngx_handle_write_event(wev, 0) != NGX_OK) { + ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); + } + return; } - if (ngx_handle_write_event(wev, 0) != NGX_OK) { - ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); - } + wev->delayed = 0; + wev->timedout = 0; + + ngx_http_perl_handle_request(r); } From mdounin at mdounin.ru Sun Apr 2 13:28:09 2017 From: mdounin at mdounin.ru (Maxim Dounin) Date: Sun, 02 Apr 2017 13:28:09 +0000 Subject: [nginx] Moved handling of wev->delayed to the connection event handler. Message-ID: details: http://hg.nginx.org/nginx/rev/903fb1ddc07f branches: changeset: 6961:903fb1ddc07f user: Maxim Dounin date: Sun Apr 02 14:32:29 2017 +0300 description: Moved handling of wev->delayed to the connection event handler. With post_action or subrequests, it is possible that the timer set for wev->delayed will expire while the active subrequest write event handler is not ready to handle this. This results in request hangs as observed with limit_rate / sendfile_max_chunk and post_action (ticket #776) or subrequests (ticket #1228). Moving the handling to the connection event handler fixes the hangs observed, and also slightly simplifies the code. diffstat: src/http/modules/ngx_http_limit_req_module.c | 5 +- src/http/modules/perl/ngx_http_perl_module.c | 5 +- src/http/ngx_http_request.c | 37 +++++++---------- src/http/ngx_http_upstream.c | 59 ++++----------------------- 4 files changed, 27 insertions(+), 79 deletions(-) diffs (187 lines): diff --git a/src/http/modules/ngx_http_limit_req_module.c b/src/http/modules/ngx_http_limit_req_module.c --- a/src/http/modules/ngx_http_limit_req_module.c +++ b/src/http/modules/ngx_http_limit_req_module.c @@ -294,7 +294,7 @@ ngx_http_limit_req_delay(ngx_http_reques wev = r->connection->write; - if (wev->delayed && !wev->timedout) { + if (wev->delayed) { if (ngx_handle_write_event(wev, 0) != NGX_OK) { ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); @@ -303,9 +303,6 @@ ngx_http_limit_req_delay(ngx_http_reques return; } - wev->delayed = 0; - wev->timedout = 0; - if (ngx_handle_read_event(r->connection->read, 0) != NGX_OK) { ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); return; diff --git a/src/http/modules/perl/ngx_http_perl_module.c b/src/http/modules/perl/ngx_http_perl_module.c --- a/src/http/modules/perl/ngx_http_perl_module.c +++ b/src/http/modules/perl/ngx_http_perl_module.c @@ -278,7 +278,7 @@ ngx_http_perl_sleep_handler(ngx_http_req wev = r->connection->write; - if (wev->delayed && !wev->timedout) { + if (wev->delayed) { if (ngx_handle_write_event(wev, 0) != NGX_OK) { ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); @@ -287,9 +287,6 @@ ngx_http_perl_sleep_handler(ngx_http_req return; } - wev->delayed = 0; - wev->timedout = 0; - ngx_http_perl_handle_request(r); } diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -2198,6 +2198,11 @@ ngx_http_request_handler(ngx_event_t *ev ngx_log_debug2(NGX_LOG_DEBUG_HTTP, c->log, 0, "http run request: \"%V?%V\"", &r->uri, &r->args); + if (ev->delayed && ev->timedout) { + ev->delayed = 0; + ev->timedout = 0; + } + if (ev->write) { r->write_event_handler(r); @@ -2621,34 +2626,22 @@ ngx_http_writer(ngx_http_request_t *r) clcf = ngx_http_get_module_loc_conf(r->main, ngx_http_core_module); if (wev->timedout) { - if (!wev->delayed) { - ngx_log_error(NGX_LOG_INFO, c->log, NGX_ETIMEDOUT, - "client timed out"); - c->timedout = 1; - - ngx_http_finalize_request(r, NGX_HTTP_REQUEST_TIME_OUT); - return; - } - - wev->timedout = 0; - wev->delayed = 0; - - if (!wev->ready) { - ngx_add_timer(wev, clcf->send_timeout); - - if (ngx_handle_write_event(wev, clcf->send_lowat) != NGX_OK) { - ngx_http_close_request(r, 0); - } - - return; - } - + ngx_log_error(NGX_LOG_INFO, c->log, NGX_ETIMEDOUT, + "client timed out"); + c->timedout = 1; + + ngx_http_finalize_request(r, NGX_HTTP_REQUEST_TIME_OUT); + return; } if (wev->delayed || r->aio) { ngx_log_debug0(NGX_LOG_DEBUG_HTTP, wev->log, 0, "http writer delayed"); + if (!wev->delayed) { + ngx_add_timer(wev, clcf->send_timeout); + } + if (ngx_handle_write_event(wev, clcf->send_lowat) != NGX_OK) { ngx_http_close_request(r, 0); } diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -1232,6 +1232,11 @@ ngx_http_upstream_handler(ngx_event_t *e ngx_log_debug2(NGX_LOG_DEBUG_HTTP, c->log, 0, "http upstream request: \"%V?%V\"", &r->uri, &r->args); + if (ev->delayed && ev->timedout) { + ev->delayed = 0; + ev->timedout = 0; + } + if (ev->write) { u->write_event_handler(r, u); @@ -3796,31 +3801,9 @@ ngx_http_upstream_process_downstream(ngx if (wev->timedout) { - if (wev->delayed) { - - wev->timedout = 0; - wev->delayed = 0; - - if (!wev->ready) { - ngx_add_timer(wev, p->send_timeout); - - if (ngx_handle_write_event(wev, p->send_lowat) != NGX_OK) { - ngx_http_upstream_finalize_request(r, u, NGX_ERROR); - } - - return; - } - - if (ngx_event_pipe(p, wev->write) == NGX_ABORT) { - ngx_http_upstream_finalize_request(r, u, NGX_ERROR); - return; - } - - } else { - p->downstream_error = 1; - c->timedout = 1; - ngx_connection_error(c, NGX_ETIMEDOUT, "client timed out"); - } + p->downstream_error = 1; + c->timedout = 1; + ngx_connection_error(c, NGX_ETIMEDOUT, "client timed out"); } else { @@ -3865,30 +3848,8 @@ ngx_http_upstream_process_upstream(ngx_h if (rev->timedout) { - if (rev->delayed) { - - rev->timedout = 0; - rev->delayed = 0; - - if (!rev->ready) { - ngx_add_timer(rev, p->read_timeout); - - if (ngx_handle_read_event(rev, 0) != NGX_OK) { - ngx_http_upstream_finalize_request(r, u, NGX_ERROR); - } - - return; - } - - if (ngx_event_pipe(p, 0) == NGX_ABORT) { - ngx_http_upstream_finalize_request(r, u, NGX_ERROR); - return; - } - - } else { - p->upstream_error = 1; - ngx_connection_error(c, NGX_ETIMEDOUT, "upstream timed out"); - } + p->upstream_error = 1; + ngx_connection_error(c, NGX_ETIMEDOUT, "upstream timed out"); } else { From mdounin at mdounin.ru Sun Apr 2 13:35:55 2017 From: mdounin at mdounin.ru (Maxim Dounin) Date: Sun, 2 Apr 2017 16:35:55 +0300 Subject: [PATCH][bugfix] Upstream: clear the delayed flag to prevent blocking from sending. In-Reply-To: References: Message-ID: <20170402133555.GU13617@mdounin.ru> Hello! On Fri, Feb 17, 2017 at 11:18:48AM +0800, ?? (hucc) wrote: > Hi, > > To reproduce the scene of send blocking, there must be more than twosubrequest, and the more the better. > > > When I encounter this problem, my config is as follows (roughly): > slice 1M; > limit_rate 2M; > proxy_buffering on > proxy_buffer_size 32K; > proxy_buffers 4 64K; > proxy_pass http://domain/uri; > > > And my system: > Linux ** 2.6.32-642.13.1.el6.x86_64 #1 SMP Wed Jan 11 20:56:24 > UTC 2017 x86_64 x86_64 x86_64 GNU/Linux > > > Patchs bellow: > > # HG changeset patch > # User hucongcong > # Date 1487298087 -28800 > # Fri Feb 17 10:21:27 2017 +0800 > # Node ID 37b376790ecf83eaaff2f024eb3093a079091d93 > # Parent 05fd0dc8f0dc808219f727dd18a5da2f078c4073 > Upstream: clear the delayed flag to prevent blocking from sending. > > Suppose that proxy_buffering is on and limit_rate is defined, the send will be > blocked in write filter when the following two conditions are met: First, the > previous upstream request sets the write->delayed flag and starts the timer of > downstream, and then finalized. Second, the timer timed out before the next > subrequest enters the function ngx_http_upstream_send_response(), which means > the delayed flag is not be cleared properly. Thus, the data transmission from > upstream to downstream will be blocked in subrequest. > > By clearing the delayed flag of c->write in ngx_http_upstream_send_response() > when the timer of write event is deleted, to solve this problem. > > diff -r 05fd0dc8f0dc -r 37b376790ecf src/http/ngx_http_upstream.c > --- a/src/http/ngx_http_upstream.c Thu Feb 16 18:37:22 2017 +0300 > +++ b/src/http/ngx_http_upstream.c Fri Feb 17 10:21:27 2017 +0800 > @@ -2848,6 +2848,10 @@ ngx_http_upstream_send_response(ngx_http > > c = r->connection; > > + if (c->write->delayed && !c->write->timer_set) { > + c->write->delayed = 0; > + } > + > if (r->header_only) { > > if (!u->buffering) { Thank you for your report. After looking into this for a while, I've committed several patches to fix various issues with wev->delayed: http://hg.nginx.org/nginx/rev/7fcf209d40c8 http://hg.nginx.org/nginx/rev/1c5e5e5b008d http://hg.nginx.org/nginx/rev/903fb1ddc07f -- Maxim Dounin http://nginx.org/ From hucong.c at foxmail.com Mon Apr 3 08:02:07 2017 From: hucong.c at foxmail.com (=?utf-8?B?6IOh6IGqIChodWNjKQ==?=) Date: Mon, 3 Apr 2017 16:02:07 +0800 Subject: [PATCH][bugfix] Upstream: clear the delayed flag to prevent blocking from sending. In-Reply-To: <20170402133555.GU13617@mdounin.ru> References: <20170402133555.GU13617@mdounin.ru> Message-ID: Hi, On Sunday, Apr 2, 2017 9:35 PM +0300, Maxim Dounin wrote: >On Fri, Feb 17, 2017 at 11:18:48AM +0800, ?? (hucc) wrote: > >> Hi, >> >> To reproduce the scene of send blocking, there must be more than >> two subrequests, and the more the better. >> > >Thank you for your report. > >After looking into this for a while, I've committed several >patches to fix various issues with wev->delayed: > >http://hg.nginx.org/nginx/rev/7fcf209d40c8 >http://hg.nginx.org/nginx/rev/1c5e5e5b008d >http://hg.nginx.org/nginx/rev/903fb1ddc07f After looked at these patches, I confirmed that the problem I encountered should be solved. Thanks for the great solution. At the same time, I noticed that the type of rc is int not ngx_int_t in ngx_http_writer(). The type should be ngx_int_t, right? There was a time the return type of ngx_http_writer() is int. Later, it became void. Since then there is no need to do type conversion. # HG changeset patch # User hucongcong # Date 1491200980 -28800 # Mon Apr 03 14:29:40 2017 +0800 # Node ID 7c3a0b951d0209612fb50a48abcb10c6ceffbff7 # Parent 903fb1ddc07f6b4345d88428898d95aadfc0223f fix type diff -r 903fb1ddc07f -r 7c3a0b951d02 src/http/ngx_http_request.c --- a/src/http/ngx_http_request.c Sun Apr 02 14:32:29 2017 +0300 +++ b/src/http/ngx_http_request.c Mon Apr 03 14:29:40 2017 +0800 @@ -2612,7 +2612,7 @@ ngx_http_set_write_handler(ngx_http_requ static void ngx_http_writer(ngx_http_request_t *r) { - int rc; + ngx_int_t rc; ngx_event_t *wev; ngx_connection_t *c; ngx_http_core_loc_conf_t *clcf; @@ -2652,7 +2652,7 @@ ngx_http_writer(ngx_http_request_t *r) rc = ngx_http_output_filter(r, NULL); ngx_log_debug3(NGX_LOG_DEBUG_HTTP, c->log, 0, - "http writer output filter: %d, \"%V?%V\"", + "http writer output filter: %i, \"%V?%V\"", rc, &r->uri, &r->args); if (rc == NGX_ERROR) { From piotrsikora at google.com Mon Apr 3 09:32:11 2017 From: piotrsikora at google.com (Piotr Sikora) Date: Mon, 03 Apr 2017 02:32:11 -0700 Subject: [PATCH 1 of 3] HTTP: add support for trailers in HTTP responses In-Reply-To: References: Message-ID: <8af81a0d66c0f69bcf50.1491211931@piotrsikora.sfo.corp.google.com> # HG changeset patch # User Piotr Sikora # Date 1490351854 25200 # Fri Mar 24 03:37:34 2017 -0700 # Node ID 8af81a0d66c0f69bcf501edcf10deed4c8f7fbd4 # Parent 39ff6939266e913e8bfd400e60f9520e70725a4d HTTP: add support for trailers in HTTP responses. Example: ngx_table_elt_t *h; h = ngx_list_push(&r->headers_out.trailers); if (h == NULL) { return NGX_ERROR; } ngx_str_set(&h->key, "Fun"); ngx_str_set(&h->value, "with trailers"); h->hash = ngx_hash_key_lc(h->key.data, h->key.len); The code above adds "Fun: with trailers" trailer to the response to the request with "TE: trailers" header (which indicates support for trailers). Modules that want to emit trailers must set r->expect_trailers = 1, otherwise they are going to be ignored. This change also adds $sent_trailer_* variables. Signed-off-by: Piotr Sikora diff -r 39ff6939266e -r 8af81a0d66c0 src/http/modules/ngx_http_chunked_filter_module.c --- a/src/http/modules/ngx_http_chunked_filter_module.c +++ b/src/http/modules/ngx_http_chunked_filter_module.c @@ -17,6 +17,7 @@ typedef struct { static ngx_int_t ngx_http_chunked_filter_init(ngx_conf_t *cf); +static ngx_chain_t *ngx_http_chunked_create_trailers(ngx_http_request_t *r); static ngx_http_module_t ngx_http_chunked_filter_module_ctx = { @@ -69,28 +70,33 @@ ngx_http_chunked_header_filter(ngx_http_ return ngx_http_next_header_filter(r); } - if (r->headers_out.content_length_n == -1) { + clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); + + if (clcf->chunked_transfer_encoding + && r->allow_trailers && r->expect_trailers) + { + ngx_http_clear_content_length(r); + r->chunked = 1; + + } else if (r->headers_out.content_length_n == -1) { if (r->http_version < NGX_HTTP_VERSION_11) { r->keepalive = 0; + } else if (clcf->chunked_transfer_encoding) { + r->chunked = 1; + } else { - clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); + r->keepalive = 0; + } + } - if (clcf->chunked_transfer_encoding) { - r->chunked = 1; + if (r->chunked) { + ctx = ngx_pcalloc(r->pool, sizeof(ngx_http_chunked_filter_ctx_t)); + if (ctx == NULL) { + return NGX_ERROR; + } - ctx = ngx_pcalloc(r->pool, - sizeof(ngx_http_chunked_filter_ctx_t)); - if (ctx == NULL) { - return NGX_ERROR; - } - - ngx_http_set_ctx(r, ctx, ngx_http_chunked_filter_module); - - } else { - r->keepalive = 0; - } - } + ngx_http_set_ctx(r, ctx, ngx_http_chunked_filter_module); } return ngx_http_next_header_filter(r); @@ -201,6 +207,15 @@ ngx_http_chunked_body_filter(ngx_http_re b->pos += 2; } + if (r->allow_trailers && r->expect_trailers) { + tl->next = ngx_http_chunked_create_trailers(r); + + if (tl->next != NULL) { + b->last -= 2; + b->last_buf = 0; + } + } + } else if (size > 0) { tl = ngx_chain_get_free_buf(r->pool, &ctx->free); if (tl == NULL) { @@ -230,6 +245,108 @@ ngx_http_chunked_body_filter(ngx_http_re } +static ngx_chain_t * +ngx_http_chunked_create_trailers(ngx_http_request_t *r) +{ + size_t len; + ngx_buf_t *b; + ngx_uint_t i; + ngx_chain_t *cl; + ngx_list_part_t *part; + ngx_table_elt_t *header; + ngx_http_chunked_filter_ctx_t *ctx; + + len = 0; + + part = &r->headers_out.trailers.part; + header = part->elts; + + for (i = 0; /* void */; i++) { + + if (i >= part->nelts) { + if (part->next == NULL) { + break; + } + + part = part->next; + header = part->elts; + i = 0; + } + + if (header[i].hash == 0) { + continue; + } + + len += header[i].key.len + sizeof(": ") - 1 + + header[i].value.len + sizeof(CRLF) - 1; + } + + if (len == 0) { + return NULL; + } + + len += sizeof(CRLF) - 1; + + ctx = ngx_http_get_module_ctx(r, ngx_http_chunked_filter_module); + + cl = ngx_chain_get_free_buf(r->pool, &ctx->free); + if (cl == NULL) { + return NULL; + } + + b = cl->buf; + + b->tag = (ngx_buf_tag_t) &ngx_http_chunked_filter_module; + b->temporary = 0; + b->memory = 1; + b->last_buf = 1; + + b->start = ngx_palloc(r->pool, len); + if (b->start == NULL) { + return NULL; + } + + b->end = b->last + len; + b->pos = b->start; + b->last = b->start; + + part = &r->headers_out.trailers.part; + header = part->elts; + + for (i = 0; /* void */; i++) { + + if (i >= part->nelts) { + if (part->next == NULL) { + break; + } + + part = part->next; + header = part->elts; + i = 0; + } + + if (header[i].hash == 0) { + continue; + } + + ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, + "http trailer: \"%V: %V\"", + &header[i].key, &header[i].value); + + b->last = ngx_copy(b->last, header[i].key.data, header[i].key.len); + *b->last++ = ':'; *b->last++ = ' '; + + b->last = ngx_copy(b->last, header[i].value.data, header[i].value.len); + *b->last++ = CR; *b->last++ = LF; + } + + /* the end of HTTP trailer */ + *b->last++ = CR; *b->last++ = LF; + + return cl; +} + + static ngx_int_t ngx_http_chunked_filter_init(ngx_conf_t *cf) { diff -r 39ff6939266e -r 8af81a0d66c0 src/http/ngx_http_core_module.c --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -2477,6 +2477,13 @@ ngx_http_subrequest(ngx_http_request_t * return NGX_ERROR; } + if (ngx_list_init(&sr->headers_out.trailers, r->pool, 4, + sizeof(ngx_table_elt_t)) + != NGX_OK) + { + return NGX_ERROR; + } + cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module); sr->main_conf = cscf->ctx->main_conf; sr->srv_conf = cscf->ctx->srv_conf; diff -r 39ff6939266e -r 8af81a0d66c0 src/http/ngx_http_request.c --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -27,6 +27,8 @@ static ngx_int_t ngx_http_process_host(n ngx_table_elt_t *h, ngx_uint_t offset); static ngx_int_t ngx_http_process_connection(ngx_http_request_t *r, ngx_table_elt_t *h, ngx_uint_t offset); +static ngx_int_t ngx_http_process_te(ngx_http_request_t *r, + ngx_table_elt_t *h, ngx_uint_t offset); static ngx_int_t ngx_http_process_user_agent(ngx_http_request_t *r, ngx_table_elt_t *h, ngx_uint_t offset); @@ -125,6 +127,10 @@ ngx_http_header_t ngx_http_headers_in[] offsetof(ngx_http_headers_in_t, if_range), ngx_http_process_unique_header_line }, + { ngx_string("TE"), + offsetof(ngx_http_headers_in_t, te), + ngx_http_process_te }, + { ngx_string("Transfer-Encoding"), offsetof(ngx_http_headers_in_t, transfer_encoding), ngx_http_process_header_line }, @@ -559,6 +565,14 @@ ngx_http_create_request(ngx_connection_t return NULL; } + if (ngx_list_init(&r->headers_out.trailers, r->pool, 4, + sizeof(ngx_table_elt_t)) + != NGX_OK) + { + ngx_destroy_pool(r->pool); + return NULL; + } + r->ctx = ngx_pcalloc(r->pool, sizeof(void *) * ngx_http_max_module); if (r->ctx == NULL) { ngx_destroy_pool(r->pool); @@ -1671,6 +1685,63 @@ ngx_http_process_connection(ngx_http_req static ngx_int_t +ngx_http_process_te(ngx_http_request_t *r, ngx_table_elt_t *h, + ngx_uint_t offset) +{ + u_char *p; + + if (r->headers_in.te == NULL) { + r->headers_in.te = h; + } + + if (r->http_version < NGX_HTTP_VERSION_11) { + return NGX_OK; + } + + if (h->value.len == sizeof("trailers") - 1 + && ngx_memcmp(h->value.data, "trailers", sizeof("trailers") - 1) == 0) + { + r->allow_trailers = 1; + return NGX_OK; + } + +#if (NGX_HTTP_V2) + + if (r->http_version >= NGX_HTTP_VERSION_20) { + ngx_log_error(NGX_LOG_INFO, r->connection->log, 0, + "client sent HTTP/2 request with invalid header value: " + "\"TE: %V\"", &h->value); + + ngx_http_finalize_request(r, NGX_HTTP_BAD_REQUEST); + return NGX_ERROR; + } + +#endif + + if (h->value.len < sizeof("trailers") - 1) { + return NGX_OK; + } + + p = ngx_strcasestrn(h->value.data, "trailers", sizeof("trailers") - 2); + if (p == NULL) { + return NGX_OK; + } + + if (p == h->value.data || *(p - 1) == ',' || *(p - 1) == ' ') { + + p += sizeof("trailers") - 1; + + if (p == h->value.data + h->value.len || *p == ',' || *p == ' ') { + r->allow_trailers = 1; + return NGX_OK; + } + } + + return NGX_OK; +} + + +static ngx_int_t ngx_http_process_user_agent(ngx_http_request_t *r, ngx_table_elt_t *h, ngx_uint_t offset) { diff -r 39ff6939266e -r 8af81a0d66c0 src/http/ngx_http_request.h --- a/src/http/ngx_http_request.h +++ b/src/http/ngx_http_request.h @@ -191,6 +191,7 @@ typedef struct { ngx_table_elt_t *range; ngx_table_elt_t *if_range; + ngx_table_elt_t *te; ngx_table_elt_t *transfer_encoding; ngx_table_elt_t *expect; ngx_table_elt_t *upgrade; @@ -247,6 +248,7 @@ typedef struct { typedef struct { ngx_list_t headers; + ngx_list_t trailers; ngx_uint_t status; ngx_str_t status_line; @@ -510,6 +512,8 @@ struct ngx_http_request_s { unsigned pipeline:1; unsigned chunked:1; unsigned header_only:1; + unsigned allow_trailers:1; + unsigned expect_trailers:1; unsigned keepalive:1; unsigned lingering_close:1; unsigned discard_body:1; diff -r 39ff6939266e -r 8af81a0d66c0 src/http/ngx_http_variables.c --- a/src/http/ngx_http_variables.c +++ b/src/http/ngx_http_variables.c @@ -38,6 +38,8 @@ static ngx_int_t ngx_http_variable_unkno ngx_http_variable_value_t *v, uintptr_t data); static ngx_int_t ngx_http_variable_unknown_header_out(ngx_http_request_t *r, ngx_http_variable_value_t *v, uintptr_t data); +static ngx_int_t ngx_http_variable_unknown_trailer_out(ngx_http_request_t *r, + ngx_http_variable_value_t *v, uintptr_t data); static ngx_int_t ngx_http_variable_request_line(ngx_http_request_t *r, ngx_http_variable_value_t *v, uintptr_t data); static ngx_int_t ngx_http_variable_cookie(ngx_http_request_t *r, @@ -365,6 +367,9 @@ static ngx_http_variable_t ngx_http_cor { ngx_string("sent_http_"), NULL, ngx_http_variable_unknown_header_out, 0, NGX_HTTP_VAR_PREFIX, 0 }, + { ngx_string("sent_trailer_"), NULL, ngx_http_variable_unknown_trailer_out, + 0, NGX_HTTP_VAR_PREFIX, 0 }, + { ngx_string("cookie_"), NULL, ngx_http_variable_cookie, 0, NGX_HTTP_VAR_PREFIX, 0 }, @@ -934,6 +939,16 @@ ngx_http_variable_unknown_header_out(ngx } +static ngx_int_t +ngx_http_variable_unknown_trailer_out(ngx_http_request_t *r, + ngx_http_variable_value_t *v, uintptr_t data) +{ + return ngx_http_variable_unknown_header(v, (ngx_str_t *) data, + &r->headers_out.trailers.part, + sizeof("sent_trailer_") - 1); +} + + ngx_int_t ngx_http_variable_unknown_header(ngx_http_variable_value_t *v, ngx_str_t *var, ngx_list_part_t *part, size_t prefix) diff -r 39ff6939266e -r 8af81a0d66c0 src/http/v2/ngx_http_v2_filter_module.c --- a/src/http/v2/ngx_http_v2_filter_module.c +++ b/src/http/v2/ngx_http_v2_filter_module.c @@ -50,13 +50,17 @@ #define NGX_HTTP_V2_SERVER_INDEX 54 #define NGX_HTTP_V2_VARY_INDEX 59 +#define NGX_HTTP_V2_FRAME_ERROR (ngx_http_v2_out_frame_t *) -1 + static u_char *ngx_http_v2_string_encode(u_char *dst, u_char *src, size_t len, u_char *tmp, ngx_uint_t lower); static u_char *ngx_http_v2_write_int(u_char *pos, ngx_uint_t prefix, ngx_uint_t value); static ngx_http_v2_out_frame_t *ngx_http_v2_create_headers_frame( - ngx_http_request_t *r, u_char *pos, u_char *end); + ngx_http_request_t *r, u_char *pos, u_char *end, ngx_uint_t fin); +static ngx_http_v2_out_frame_t *ngx_http_v2_create_trailers_frame( + ngx_http_request_t *r); static ngx_chain_t *ngx_http_v2_send_chain(ngx_connection_t *fc, ngx_chain_t *in, off_t limit); @@ -129,12 +133,12 @@ ngx_http_v2_header_filter(ngx_http_reque u_char status, *pos, *start, *p, *tmp; size_t len, tmp_len; ngx_str_t host, location; - ngx_uint_t i, port; + ngx_uint_t i, port, fin; ngx_list_part_t *part; ngx_table_elt_t *header; ngx_connection_t *fc; ngx_http_cleanup_t *cln; - ngx_http_v2_out_frame_t *frame; + ngx_http_v2_out_frame_t *headers, *trailers; ngx_http_core_loc_conf_t *clcf; ngx_http_core_srv_conf_t *cscf; u_char addr[NGX_SOCKADDR_STRLEN]; @@ -612,13 +616,6 @@ ngx_http_v2_header_filter(ngx_http_reque header[i].value.len, tmp); } - frame = ngx_http_v2_create_headers_frame(r, start, pos); - if (frame == NULL) { - return NGX_ERROR; - } - - ngx_http_v2_queue_blocked_frame(r->stream->connection, frame); - cln = ngx_http_cleanup_add(r, 0); if (cln == NULL) { return NGX_ERROR; @@ -627,8 +624,32 @@ ngx_http_v2_header_filter(ngx_http_reque cln->handler = ngx_http_v2_filter_cleanup; cln->data = r->stream; + if (r->header_only && r->allow_trailers && r->expect_trailers) { + trailers = ngx_http_v2_create_trailers_frame(r); + if (trailers == NGX_HTTP_V2_FRAME_ERROR) { + return NGX_ERROR; + } + + fin = trailers ? 0 : 1; + + } else { + trailers = NULL; + fin = r->header_only; + } + + headers = ngx_http_v2_create_headers_frame(r, start, pos, fin); + if (headers == NULL) { + return NGX_ERROR; + } + + ngx_http_v2_queue_blocked_frame(r->stream->connection, headers); r->stream->queued = 1; + if (trailers) { + ngx_http_v2_queue_blocked_frame(r->stream->connection, trailers); + r->stream->queued++; + } + fc->send_chain = ngx_http_v2_send_chain; fc->need_last_buf = 1; @@ -636,6 +657,129 @@ ngx_http_v2_header_filter(ngx_http_reque } +static ngx_http_v2_out_frame_t * +ngx_http_v2_create_trailers_frame(ngx_http_request_t *r) +{ + u_char *pos, *start, *tmp; + size_t len, tmp_len; + ngx_uint_t i; + ngx_list_part_t *part; + ngx_table_elt_t *header; + ngx_http_v2_out_frame_t *frame; + + len = 0; + tmp_len = 0; + + part = &r->headers_out.trailers.part; + header = part->elts; + + for (i = 0; /* void */; i++) { + + if (i >= part->nelts) { + if (part->next == NULL) { + break; + } + + part = part->next; + header = part->elts; + i = 0; + } + + if (header[i].hash == 0) { + continue; + } + + if (header[i].key.len > NGX_HTTP_V2_MAX_FIELD) { + ngx_log_error(NGX_LOG_WARN, r->connection->log, 0, + "too long response trailer name: \"%V\"", + &header[i].key); + + return NGX_HTTP_V2_FRAME_ERROR; + } + + if (header[i].value.len > NGX_HTTP_V2_MAX_FIELD) { + ngx_log_error(NGX_LOG_WARN, r->connection->log, 0, + "too long response trailer value: \"%V: %V\"", + &header[i].key, &header[i].value); + + return NGX_HTTP_V2_FRAME_ERROR; + } + + len += 1 + NGX_HTTP_V2_INT_OCTETS + header[i].key.len + + NGX_HTTP_V2_INT_OCTETS + header[i].value.len; + + if (header[i].key.len > tmp_len) { + tmp_len = header[i].key.len; + } + + if (header[i].value.len > tmp_len) { + tmp_len = header[i].value.len; + } + } + + if (len == 0) { + return NULL; + } + + tmp = ngx_palloc(r->pool, tmp_len); + pos = ngx_pnalloc(r->pool, len); + + if (pos == NULL || tmp == NULL) { + return NGX_HTTP_V2_FRAME_ERROR; + } + + start = pos; + + part = &r->headers_out.trailers.part; + header = part->elts; + + for (i = 0; /* void */; i++) { + + if (i >= part->nelts) { + if (part->next == NULL) { + break; + } + + part = part->next; + header = part->elts; + i = 0; + } + + if (header[i].hash == 0 + || header[i].key.len > NGX_HTTP_V2_MAX_FIELD + || header[i].value.len > NGX_HTTP_V2_MAX_FIELD) + { + continue; + } + +#if (NGX_DEBUG) + if (r->connection->log->log_level & NGX_LOG_DEBUG_HTTP) { + ngx_strlow(tmp, header[i].key.data, header[i].key.len); + + ngx_log_debug3(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, + "http2 output trailer: \"%*s: %V\"", + header[i].key.len, tmp, &header[i].value); + } +#endif + + *pos++ = 0; + + pos = ngx_http_v2_write_name(pos, header[i].key.data, + header[i].key.len, tmp); + + pos = ngx_http_v2_write_value(pos, header[i].value.data, + header[i].value.len, tmp); + } + + frame = ngx_http_v2_create_headers_frame(r, start, pos, 1); + if (frame == NULL) { + return NGX_HTTP_V2_FRAME_ERROR; + } + + return frame; +} + + static u_char * ngx_http_v2_string_encode(u_char *dst, u_char *src, size_t len, u_char *tmp, ngx_uint_t lower) @@ -686,7 +830,7 @@ ngx_http_v2_write_int(u_char *pos, ngx_u static ngx_http_v2_out_frame_t * ngx_http_v2_create_headers_frame(ngx_http_request_t *r, u_char *pos, - u_char *end) + u_char *end, ngx_uint_t fin) { u_char type, flags; size_t rest, frame_size; @@ -707,12 +851,12 @@ ngx_http_v2_create_headers_frame(ngx_htt frame->stream = stream; frame->length = rest; frame->blocked = 1; - frame->fin = r->header_only; + frame->fin = fin; ll = &frame->first; type = NGX_HTTP_V2_HEADERS_FRAME; - flags = r->header_only ? NGX_HTTP_V2_END_STREAM_FLAG : NGX_HTTP_V2_NO_FLAG; + flags = fin ? NGX_HTTP_V2_END_STREAM_FLAG : NGX_HTTP_V2_NO_FLAG; frame_size = stream->connection->frame_size; for ( ;; ) { @@ -774,7 +918,7 @@ ngx_http_v2_create_headers_frame(ngx_htt continue; } - b->last_buf = r->header_only; + b->last_buf = fin; cl->next = NULL; frame->last = cl; @@ -796,7 +940,7 @@ ngx_http_v2_send_chain(ngx_connection_t ngx_http_request_t *r; ngx_http_v2_stream_t *stream; ngx_http_v2_loc_conf_t *h2lcf; - ngx_http_v2_out_frame_t *frame; + ngx_http_v2_out_frame_t *frame, *trailers; ngx_http_v2_connection_t *h2c; r = fc->data; @@ -870,6 +1014,8 @@ ngx_http_v2_send_chain(ngx_connection_t frame_size = (h2lcf->chunk_size < h2c->frame_size) ? h2lcf->chunk_size : h2c->frame_size; + trailers = NULL; + #if (NGX_SUPPRESS_WARN) cl = NULL; #endif @@ -932,17 +1078,36 @@ ngx_http_v2_send_chain(ngx_connection_t size -= rest; } - frame = ngx_http_v2_filter_get_data_frame(stream, frame_size, out, cl); - if (frame == NULL) { - return NGX_CHAIN_ERROR; + if (cl->buf->last_buf && r->allow_trailers && r->expect_trailers) { + trailers = ngx_http_v2_create_trailers_frame(r); + if (trailers == NGX_HTTP_V2_FRAME_ERROR) { + return NGX_CHAIN_ERROR; + } + + if (trailers) { + cl->buf->last_buf = 0; + } } - ngx_http_v2_queue_frame(h2c, frame); + if (frame_size || cl->buf->last_buf) { + frame = ngx_http_v2_filter_get_data_frame(stream, frame_size, out, + cl); + if (frame == NULL) { + return NGX_CHAIN_ERROR; + } - h2c->send_window -= frame_size; + ngx_http_v2_queue_frame(h2c, frame); - stream->send_window -= frame_size; - stream->queued++; + h2c->send_window -= frame_size; + + stream->send_window -= frame_size; + stream->queued++; + } + + if (trailers) { + ngx_http_v2_queue_frame(h2c, trailers); + stream->queued++; + } if (in == NULL) { break; From piotrsikora at google.com Mon Apr 3 09:32:12 2017 From: piotrsikora at google.com (Piotr Sikora) Date: Mon, 03 Apr 2017 02:32:12 -0700 Subject: [PATCH 2 of 3] Headers filter: add "add_trailer" directive In-Reply-To: References: Message-ID: <5bab17ebe2b1f8ec42cf.1491211932@piotrsikora.sfo.corp.google.com> # HG changeset patch # User Piotr Sikora # Date 1490351854 25200 # Fri Mar 24 03:37:34 2017 -0700 # Node ID 5bab17ebe2b1f8ec42cf069bf484489c2a92c7a8 # Parent 8af81a0d66c0f69bcf501edcf10deed4c8f7fbd4 Headers filter: add "add_trailer" directive. Trailers added using this directive are evaluated after response body is processed by output filters (but before it's written to the wire), so it's possible to use variables calculated from the response body as the trailer value. Signed-off-by: Piotr Sikora diff -r 8af81a0d66c0 -r 5bab17ebe2b1 src/http/modules/ngx_http_chunked_filter_module.c --- a/src/http/modules/ngx_http_chunked_filter_module.c +++ b/src/http/modules/ngx_http_chunked_filter_module.c @@ -256,6 +256,10 @@ ngx_http_chunked_create_trailers(ngx_htt ngx_table_elt_t *header; ngx_http_chunked_filter_ctx_t *ctx; + if (ngx_http_eval_trailers(r) != NGX_OK) { + return NULL; + } + len = 0; part = &r->headers_out.trailers.part; diff -r 8af81a0d66c0 -r 5bab17ebe2b1 src/http/modules/ngx_http_headers_filter_module.c --- a/src/http/modules/ngx_http_headers_filter_module.c +++ b/src/http/modules/ngx_http_headers_filter_module.c @@ -48,6 +48,7 @@ typedef struct { time_t expires_time; ngx_http_complex_value_t *expires_value; ngx_array_t *headers; + ngx_array_t *trailers; } ngx_http_headers_conf_t; @@ -72,6 +73,8 @@ static char *ngx_http_headers_expires(ng void *conf); static char *ngx_http_headers_add(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); +static char *ngx_http_headers_add_trailer(ngx_conf_t *cf, ngx_command_t *cmd, + void *conf); static ngx_http_set_header_t ngx_http_set_headers[] = { @@ -108,6 +111,14 @@ static ngx_command_t ngx_http_headers_f 0, NULL}, + { ngx_string("add_trailer"), + NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF + |NGX_CONF_TAKE23, + ngx_http_headers_add_trailer, + NGX_HTTP_LOC_CONF_OFFSET, + 0, + NULL}, + ngx_null_command }; @@ -149,15 +160,24 @@ static ngx_http_output_header_filter_pt static ngx_int_t ngx_http_headers_filter(ngx_http_request_t *r) { - ngx_str_t value; - ngx_uint_t i, safe_status; - ngx_http_header_val_t *h; - ngx_http_headers_conf_t *conf; + u_char *p, *data; + size_t len; + ngx_str_t value; + ngx_uint_t i, safe_status; + ngx_table_elt_t *t; + ngx_http_header_val_t *h; + ngx_http_headers_conf_t *conf; + ngx_http_core_loc_conf_t *clcf; + + if (r != r->main) { + return ngx_http_next_header_filter(r); + } conf = ngx_http_get_module_loc_conf(r, ngx_http_headers_filter_module); - if ((conf->expires == NGX_HTTP_EXPIRES_OFF && conf->headers == NULL) - || r != r->main) + if (conf->expires == NGX_HTTP_EXPIRES_OFF + && conf->headers == NULL + && conf->trailers == NULL) { return ngx_http_next_header_filter(r); } @@ -205,6 +225,84 @@ ngx_http_headers_filter(ngx_http_request } } + if (conf->trailers && r->allow_trailers) { + + if (r->http_version < NGX_HTTP_VERSION_20) { + if (r->header_only + || r->headers_out.status == NGX_HTTP_NOT_MODIFIED + || r->headers_out.status == NGX_HTTP_NO_CONTENT + || r->headers_out.status < NGX_HTTP_OK + || r->method == NGX_HTTP_HEAD) + { + return ngx_http_next_header_filter(r); + } + + clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); + + if (!clcf->chunked_transfer_encoding) { + return ngx_http_next_header_filter(r); + } + } + + len = 0; + + h = conf->trailers->elts; + for (i = 0; i < conf->trailers->nelts; i++) { + + if (!safe_status && !h[i].always) { + continue; + } + + if (h[i].value.value.len) { + len += h[i].key.len + sizeof(", ") - 1; + } + } + + if (len == 0) { + return ngx_http_next_header_filter(r); + } + + len -= sizeof(", ") - 1; + + t = ngx_list_push(&r->headers_out.headers); + if (t == NULL) { + return NGX_ERROR; + } + + data = ngx_pnalloc(r->pool, len); + if (data == NULL) { + return NGX_ERROR; + } + + p = data; + + h = conf->trailers->elts; + for (i = 0; i < conf->trailers->nelts; i++) { + + if (!safe_status && !h[i].always) { + continue; + } + + if (h[i].value.value.len) { + p = ngx_copy(p, h[i].key.data, h[i].key.len); + + if (p == data + len) { + break; + } + + *p++ = ','; *p++ = ' '; + } + } + + ngx_str_set(&t->key, "Trailer"); + t->value.data = data; + t->value.len = len; + t->hash = ngx_hash(ngx_hash(ngx_hash(ngx_hash(ngx_hash( + ngx_hash('t', 'r'), 'a'), 'i'), 'l'), 'e'), 'r'); + + r->expect_trailers = 1; + } + return ngx_http_next_header_filter(r); } @@ -541,6 +639,67 @@ ngx_http_set_response_header(ngx_http_re } +ngx_int_t +ngx_http_eval_trailers(ngx_http_request_t *r) +{ + ngx_str_t value; + ngx_uint_t i, safe_status; + ngx_table_elt_t *t; + ngx_http_header_val_t *h; + ngx_http_headers_conf_t *conf; + + conf = ngx_http_get_module_loc_conf(r, ngx_http_headers_filter_module); + + if (conf->trailers == NULL) { + return NGX_OK; + } + + switch (r->headers_out.status) { + + case NGX_HTTP_OK: + case NGX_HTTP_CREATED: + case NGX_HTTP_NO_CONTENT: + case NGX_HTTP_PARTIAL_CONTENT: + case NGX_HTTP_MOVED_PERMANENTLY: + case NGX_HTTP_MOVED_TEMPORARILY: + case NGX_HTTP_SEE_OTHER: + case NGX_HTTP_NOT_MODIFIED: + case NGX_HTTP_TEMPORARY_REDIRECT: + safe_status = 1; + break; + + default: + safe_status = 0; + break; + } + + h = conf->trailers->elts; + for (i = 0; i < conf->trailers->nelts; i++) { + + if (!safe_status && !h[i].always) { + continue; + } + + if (ngx_http_complex_value(r, &h[i].value, &value) != NGX_OK) { + return NGX_ERROR; + } + + if (value.len) { + t = ngx_list_push(&r->headers_out.trailers); + if (t == NULL) { + return NGX_ERROR; + } + + t->key = h[i].key; + t->value = value; + t->hash = 1; + } + } + + return NGX_OK; +} + + static void * ngx_http_headers_create_conf(ngx_conf_t *cf) { @@ -555,6 +714,7 @@ ngx_http_headers_create_conf(ngx_conf_t * set by ngx_pcalloc(): * * conf->headers = NULL; + * conf->trailers = NULL; * conf->expires_time = 0; * conf->expires_value = NULL; */ @@ -585,6 +745,10 @@ ngx_http_headers_merge_conf(ngx_conf_t * conf->headers = prev->headers; } + if (conf->trailers == NULL) { + conf->trailers = prev->trailers; + } + return NGX_CONF_OK; } @@ -739,3 +903,63 @@ ngx_http_headers_add(ngx_conf_t *cf, ngx return NGX_CONF_OK; } + + +static char * +ngx_http_headers_add_trailer(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) +{ + ngx_http_headers_conf_t *hcf = conf; + + ngx_str_t *value; + ngx_http_header_val_t *hv; + ngx_http_compile_complex_value_t ccv; + + value = cf->args->elts; + + if (hcf->trailers == NULL) { + hcf->trailers = ngx_array_create(cf->pool, 1, + sizeof(ngx_http_header_val_t)); + if (hcf->trailers == NULL) { + return NGX_CONF_ERROR; + } + } + + hv = ngx_array_push(hcf->trailers); + if (hv == NULL) { + return NGX_CONF_ERROR; + } + + hv->key = value[1]; + hv->handler = NULL; + hv->offset = 0; + hv->always = 0; + + if (value[2].len == 0) { + ngx_memzero(&hv->value, sizeof(ngx_http_complex_value_t)); + + } else { + ngx_memzero(&ccv, sizeof(ngx_http_compile_complex_value_t)); + + ccv.cf = cf; + ccv.value = &value[2]; + ccv.complex_value = &hv->value; + + if (ngx_http_compile_complex_value(&ccv) != NGX_OK) { + return NGX_CONF_ERROR; + } + } + + if (cf->args->nelts == 3) { + return NGX_CONF_OK; + } + + if (ngx_strcmp(value[3].data, "always") != 0) { + ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, + "invalid parameter \"%V\"", &value[3]); + return NGX_CONF_ERROR; + } + + hv->always = 1; + + return NGX_CONF_OK; +} diff -r 8af81a0d66c0 -r 5bab17ebe2b1 src/http/ngx_http.h --- a/src/http/ngx_http.h +++ b/src/http/ngx_http.h @@ -143,6 +143,7 @@ ngx_int_t ngx_http_special_response_hand ngx_int_t ngx_http_filter_finalize_request(ngx_http_request_t *r, ngx_module_t *m, ngx_int_t error); void ngx_http_clean_header(ngx_http_request_t *r); +ngx_int_t ngx_http_eval_trailers(ngx_http_request_t *r); ngx_int_t ngx_http_discard_request_body(ngx_http_request_t *r); diff -r 8af81a0d66c0 -r 5bab17ebe2b1 src/http/v2/ngx_http_v2_filter_module.c --- a/src/http/v2/ngx_http_v2_filter_module.c +++ b/src/http/v2/ngx_http_v2_filter_module.c @@ -667,6 +667,10 @@ ngx_http_v2_create_trailers_frame(ngx_ht ngx_table_elt_t *header; ngx_http_v2_out_frame_t *frame; + if (ngx_http_eval_trailers(r) != NGX_OK) { + return NGX_HTTP_V2_FRAME_ERROR; + } + len = 0; tmp_len = 0; From piotrsikora at google.com Mon Apr 3 09:32:13 2017 From: piotrsikora at google.com (Piotr Sikora) Date: Mon, 03 Apr 2017 02:32:13 -0700 Subject: [PATCH 3 of 3] Upstream: add support for trailers in HTTP responses In-Reply-To: References: Message-ID: <488c59bd49dcb1503144.1491211933@piotrsikora.sfo.corp.google.com> # HG changeset patch # User Piotr Sikora # Date 1490351854 25200 # Fri Mar 24 03:37:34 2017 -0700 # Node ID 488c59bd49dcb1503144fe4d712165b69d1a5945 # Parent 5bab17ebe2b1f8ec42cf069bf484489c2a92c7a8 Upstream: add support for trailers in HTTP responses. Please note that due to how upstream module terminates processing of responses that cannot have message body (responses to HEAD requests, and responses with 1xx, 204 and 304 status codes), trailers of those responses won't be passed to the downstream. This change also adds $upstream_trailer_* variables. Signed-off-by: Piotr Sikora diff -r 5bab17ebe2b1 -r 488c59bd49dc src/http/modules/ngx_http_fastcgi_module.c --- a/src/http/modules/ngx_http_fastcgi_module.c +++ b/src/http/modules/ngx_http_fastcgi_module.c @@ -2784,10 +2784,10 @@ ngx_http_fastcgi_create_loc_conf(ngx_con conf->upstream.intercept_errors = NGX_CONF_UNSET; - /* "fastcgi_cyclic_temp_file" is disabled */ + /* the hardcoded values */ conf->upstream.cyclic_temp_file = 0; - conf->upstream.change_buffering = 1; + conf->upstream.pass_trailers = 0; conf->catch_stderr = NGX_CONF_UNSET_PTR; diff -r 5bab17ebe2b1 -r 488c59bd49dc src/http/modules/ngx_http_memcached_module.c --- a/src/http/modules/ngx_http_memcached_module.c +++ b/src/http/modules/ngx_http_memcached_module.c @@ -619,6 +619,7 @@ ngx_http_memcached_create_loc_conf(ngx_c conf->upstream.pass_request_headers = 0; conf->upstream.pass_request_body = 0; conf->upstream.force_ranges = 1; + conf->upstream.pass_trailers = 0; conf->index = NGX_CONF_UNSET; conf->gzip_flag = NGX_CONF_UNSET_UINT; diff -r 5bab17ebe2b1 -r 488c59bd49dc src/http/modules/ngx_http_proxy_module.c --- a/src/http/modules/ngx_http_proxy_module.c +++ b/src/http/modules/ngx_http_proxy_module.c @@ -2886,11 +2886,12 @@ ngx_http_proxy_create_loc_conf(ngx_conf_ conf->ssl_passwords = NGX_CONF_UNSET_PTR; #endif - /* "proxy_cyclic_temp_file" is disabled */ + /* the hardcoded values */ conf->upstream.cyclic_temp_file = 0; + conf->upstream.change_buffering = 1; + conf->upstream.pass_trailers = 0; conf->redirect = NGX_CONF_UNSET; - conf->upstream.change_buffering = 1; conf->cookie_domains = NGX_CONF_UNSET_PTR; conf->cookie_paths = NGX_CONF_UNSET_PTR; diff -r 5bab17ebe2b1 -r 488c59bd49dc src/http/modules/ngx_http_scgi_module.c --- a/src/http/modules/ngx_http_scgi_module.c +++ b/src/http/modules/ngx_http_scgi_module.c @@ -1234,10 +1234,10 @@ ngx_http_scgi_create_loc_conf(ngx_conf_t conf->upstream.intercept_errors = NGX_CONF_UNSET; - /* "scgi_cyclic_temp_file" is disabled */ + /* the hardcoded values */ conf->upstream.cyclic_temp_file = 0; - conf->upstream.change_buffering = 1; + conf->upstream.pass_trailers = 0; ngx_str_set(&conf->upstream.module, "scgi"); diff -r 5bab17ebe2b1 -r 488c59bd49dc src/http/modules/ngx_http_uwsgi_module.c --- a/src/http/modules/ngx_http_uwsgi_module.c +++ b/src/http/modules/ngx_http_uwsgi_module.c @@ -1448,10 +1448,10 @@ ngx_http_uwsgi_create_loc_conf(ngx_conf_ conf->ssl_passwords = NGX_CONF_UNSET_PTR; #endif - /* "uwsgi_cyclic_temp_file" is disabled */ + /* the hardcoded values */ conf->upstream.cyclic_temp_file = 0; - conf->upstream.change_buffering = 1; + conf->upstream.pass_trailers = 0; ngx_str_set(&conf->upstream.module, "uwsgi"); diff -r 5bab17ebe2b1 -r 488c59bd49dc src/http/ngx_http_upstream.c --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -55,6 +55,8 @@ static ngx_int_t ngx_http_upstream_inter static ngx_int_t ngx_http_upstream_test_connect(ngx_connection_t *c); static ngx_int_t ngx_http_upstream_process_headers(ngx_http_request_t *r, ngx_http_upstream_t *u); +static ngx_int_t ngx_http_upstream_process_trailers(ngx_http_request_t *r, + ngx_http_upstream_t *u); static void ngx_http_upstream_process_body_in_memory(ngx_http_request_t *r, ngx_http_upstream_t *u); static void ngx_http_upstream_send_response(ngx_http_request_t *r, @@ -149,6 +151,8 @@ static ngx_int_t ngx_http_upstream_rewri ngx_table_elt_t *h, ngx_uint_t offset); static ngx_int_t ngx_http_upstream_copy_allow_ranges(ngx_http_request_t *r, ngx_table_elt_t *h, ngx_uint_t offset); +static ngx_int_t ngx_http_upstream_copy_trailer(ngx_http_request_t *r, + ngx_table_elt_t *h, ngx_uint_t offset); #if (NGX_HTTP_GZIP) static ngx_int_t ngx_http_upstream_copy_content_encoding(ngx_http_request_t *r, @@ -166,6 +170,8 @@ static ngx_int_t ngx_http_upstream_respo ngx_http_request_t *r, ngx_http_variable_value_t *v, uintptr_t data); static ngx_int_t ngx_http_upstream_header_variable(ngx_http_request_t *r, ngx_http_variable_value_t *v, uintptr_t data); +static ngx_int_t ngx_http_upstream_trailer_variable(ngx_http_request_t *r, + ngx_http_variable_value_t *v, uintptr_t data); static ngx_int_t ngx_http_upstream_cookie_variable(ngx_http_request_t *r, ngx_http_variable_value_t *v, uintptr_t data); @@ -307,6 +313,10 @@ static ngx_http_upstream_header_t ngx_h ngx_http_upstream_process_charset, 0, ngx_http_upstream_copy_header_line, 0, 0 }, + { ngx_string("Trailer"), + ngx_http_upstream_ignore_header_line, 0, + ngx_http_upstream_copy_trailer, 0, 0 }, + { ngx_string("Transfer-Encoding"), ngx_http_upstream_process_transfer_encoding, 0, ngx_http_upstream_ignore_header_line, 0, 0 }, @@ -422,6 +432,9 @@ static ngx_http_variable_t ngx_http_ups { ngx_string("upstream_http_"), NULL, ngx_http_upstream_header_variable, 0, NGX_HTTP_VAR_NOCACHEABLE|NGX_HTTP_VAR_PREFIX, 0 }, + { ngx_string("upstream_trailer_"), NULL, ngx_http_upstream_trailer_variable, + 0, NGX_HTTP_VAR_NOCACHEABLE|NGX_HTTP_VAR_PREFIX, 0 }, + { ngx_string("upstream_cookie_"), NULL, ngx_http_upstream_cookie_variable, 0, NGX_HTTP_VAR_NOCACHEABLE|NGX_HTTP_VAR_PREFIX, 0 }, @@ -1041,6 +1054,13 @@ ngx_http_upstream_cache_send(ngx_http_re return NGX_ERROR; } + if (ngx_list_init(&u->headers_in.trailers, r->pool, 2, + sizeof(ngx_table_elt_t)) + != NGX_OK) + { + return NGX_ERROR; + } + rc = u->process_header(r); if (rc == NGX_OK) { @@ -1861,6 +1881,13 @@ ngx_http_upstream_reinit(ngx_http_reques return NGX_ERROR; } + if (ngx_list_init(&u->headers_in.trailers, r->pool, 2, + sizeof(ngx_table_elt_t)) + != NGX_OK) + { + return NGX_ERROR; + } + /* reinit the request chain */ file_pos = 0; @@ -2228,6 +2255,15 @@ ngx_http_upstream_process_header(ngx_htt return; } + if (ngx_list_init(&u->headers_in.trailers, r->pool, 2, + sizeof(ngx_table_elt_t)) + != NGX_OK) + { + ngx_http_upstream_finalize_request(r, u, + NGX_HTTP_INTERNAL_SERVER_ERROR); + return; + } + #if (NGX_HTTP_CACHE) if (r->cache) { @@ -2735,6 +2771,44 @@ ngx_http_upstream_process_headers(ngx_ht } +static ngx_int_t +ngx_http_upstream_process_trailers(ngx_http_request_t *r, ngx_http_upstream_t *u) +{ + ngx_uint_t i; + ngx_list_part_t *part; + ngx_table_elt_t *h, *ho; + + if (!u->conf->pass_trailers || !r->allow_trailers || !r->expect_trailers) { + return NGX_OK; + } + + part = &u->headers_in.trailers.part; + h = part->elts; + + for (i = 0; /* void */; i++) { + + if (i >= part->nelts) { + if (part->next == NULL) { + break; + } + + part = part->next; + h = part->elts; + i = 0; + } + + ho = ngx_list_push(&r->headers_out.trailers); + if (ho == NULL) { + return NGX_ERROR; + } + + *ho = h[i]; + } + + return NGX_OK; +} + + static void ngx_http_upstream_process_body_in_memory(ngx_http_request_t *r, ngx_http_upstream_t *u) @@ -4396,6 +4470,13 @@ ngx_http_upstream_finalize_request(ngx_h } if (rc == 0) { + if (ngx_http_upstream_process_trailers(r, u) != NGX_OK) { + rc = NGX_ERROR; + flush = 1; + } + } + + if (rc == 0) { rc = ngx_http_send_special(r, NGX_HTTP_LAST); } else if (flush) { @@ -5181,6 +5262,29 @@ ngx_http_upstream_copy_allow_ranges(ngx_ } +static ngx_int_t +ngx_http_upstream_copy_trailer(ngx_http_request_t *r, + ngx_table_elt_t *h, ngx_uint_t offset) +{ + ngx_table_elt_t *ho; + + if (!r->upstream->conf->pass_trailers + || !r->allow_trailers || !r->expect_trailers) + { + return NGX_OK; + } + + ho = ngx_list_push(&r->headers_out.headers); + if (ho == NULL) { + return NGX_ERROR; + } + + *ho = *h; + + return NGX_OK; +} + + #if (NGX_HTTP_GZIP) static ngx_int_t @@ -5519,6 +5623,21 @@ ngx_http_upstream_header_variable(ngx_ht static ngx_int_t +ngx_http_upstream_trailer_variable(ngx_http_request_t *r, + ngx_http_variable_value_t *v, uintptr_t data) +{ + if (r->upstream == NULL) { + v->not_found = 1; + return NGX_OK; + } + + return ngx_http_variable_unknown_header(v, (ngx_str_t *) data, + &r->upstream->headers_in.trailers.part, + sizeof("upstream_trailer_") - 1); +} + + +static ngx_int_t ngx_http_upstream_cookie_variable(ngx_http_request_t *r, ngx_http_variable_value_t *v, uintptr_t data) { diff -r 5bab17ebe2b1 -r 488c59bd49dc src/http/ngx_http_upstream.h --- a/src/http/ngx_http_upstream.h +++ b/src/http/ngx_http_upstream.h @@ -183,6 +183,7 @@ typedef struct { ngx_hash_t hide_headers_hash; ngx_array_t *hide_headers; ngx_array_t *pass_headers; + ngx_flag_t pass_trailers; ngx_http_upstream_local_t *local; @@ -248,6 +249,7 @@ typedef struct { typedef struct { ngx_list_t headers; + ngx_list_t trailers; ngx_uint_t status_n; ngx_str_t status_line; From piotrsikora at google.com Mon Apr 3 09:33:43 2017 From: piotrsikora at google.com (Piotr Sikora) Date: Mon, 3 Apr 2017 02:33:43 -0700 Subject: [PATCH 3 of 3] Upstream: add support for trailers in HTTP responses In-Reply-To: <488c59bd49dcb1503144.1491211933@piotrsikora.sfo.corp.google.com> References: <488c59bd49dcb1503144.1491211933@piotrsikora.sfo.corp.google.com> Message-ID: Hey, > +static ngx_int_t > +ngx_http_upstream_copy_trailer(ngx_http_request_t *r, > + ngx_table_elt_t *h, ngx_uint_t offset) > +{ > + ngx_table_elt_t *ho; > + > + if (!r->upstream->conf->pass_trailers > + || !r->allow_trailers || !r->expect_trailers) > + { > + return NGX_OK; > + } > + > + ho = ngx_list_push(&r->headers_out.headers); > + if (ho == NULL) { > + return NGX_ERROR; > + } > + > + *ho = *h; > + > + return NGX_OK; > +} Patch updated so that "Trailer" header is only forwarded with trailers. Best regards, Piotr Sikora From arut at nginx.com Mon Apr 3 10:44:52 2017 From: arut at nginx.com (Roman Arutyunyan) Date: Mon, 03 Apr 2017 10:44:52 +0000 Subject: [nginx] Slice filter: allowed at most one subrequest at a time. Message-ID: details: http://hg.nginx.org/nginx/rev/a97ad1663ef4 branches: changeset: 6962:a97ad1663ef4 user: Roman Arutyunyan date: Tue Mar 28 14:03:57 2017 +0300 description: Slice filter: allowed at most one subrequest at a time. Previously, if slice main request write handler was called while a slice subrequest was running, a new subrequest for the same slice was started. diffstat: src/http/modules/ngx_http_slice_filter_module.c | 28 ++++++++++++++---------- 1 files changed, 16 insertions(+), 12 deletions(-) diffs (73 lines): diff -r 903fb1ddc07f -r a97ad1663ef4 src/http/modules/ngx_http_slice_filter_module.c --- a/src/http/modules/ngx_http_slice_filter_module.c Sun Apr 02 14:32:29 2017 +0300 +++ b/src/http/modules/ngx_http_slice_filter_module.c Tue Mar 28 14:03:57 2017 +0300 @@ -11,23 +11,24 @@ typedef struct { - size_t size; + size_t size; } ngx_http_slice_loc_conf_t; typedef struct { - off_t start; - off_t end; - ngx_str_t range; - ngx_str_t etag; - ngx_uint_t last; /* unsigned last:1; */ + off_t start; + off_t end; + ngx_str_t range; + ngx_str_t etag; + ngx_uint_t last; /* unsigned last:1; */ + ngx_http_request_t *sr; } ngx_http_slice_ctx_t; typedef struct { - off_t start; - off_t end; - off_t complete_length; + off_t start; + off_t end; + off_t complete_length; } ngx_http_slice_content_range_t; @@ -209,7 +210,6 @@ ngx_http_slice_body_filter(ngx_http_requ { ngx_int_t rc; ngx_chain_t *cl; - ngx_http_request_t *sr; ngx_http_slice_ctx_t *ctx; ngx_http_slice_loc_conf_t *slcf; @@ -234,6 +234,10 @@ ngx_http_slice_body_filter(ngx_http_requ return rc; } + if (ctx->sr && !ctx->sr->done) { + return rc; + } + if (ctx->start >= ctx->end) { ngx_http_set_ctx(r, NULL, ngx_http_slice_filter_module); ngx_http_send_special(r, NGX_HTTP_LAST); @@ -244,14 +248,14 @@ ngx_http_slice_body_filter(ngx_http_requ return rc; } - if (ngx_http_subrequest(r, &r->uri, &r->args, &sr, NULL, + if (ngx_http_subrequest(r, &r->uri, &r->args, &ctx->sr, NULL, NGX_HTTP_SUBREQUEST_CLONE) != NGX_OK) { return NGX_ERROR; } - ngx_http_set_ctx(sr, ctx, ngx_http_slice_filter_module); + ngx_http_set_ctx(ctx->sr, ctx, ngx_http_slice_filter_module); slcf = ngx_http_get_module_loc_conf(r, ngx_http_slice_filter_module); From arut at nginx.com Mon Apr 3 10:44:55 2017 From: arut at nginx.com (Roman Arutyunyan) Date: Mon, 03 Apr 2017 10:44:55 +0000 Subject: [nginx] Slice filter: prevented slice redirection (ticket #1219). Message-ID: details: http://hg.nginx.org/nginx/rev/3ff293cfdab8 branches: changeset: 6963:3ff293cfdab8 user: Roman Arutyunyan date: Fri Mar 31 21:47:56 2017 +0300 description: Slice filter: prevented slice redirection (ticket #1219). When a slice subrequest was redirected to a new location, its context was lost. After its completion, a new slice subrequest for the same slice was created. This could lead to infinite loop. Now the slice module makes sure each slice subrequest starts output with the slice context available. diffstat: src/http/modules/ngx_http_slice_filter_module.c | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diffs (43 lines): diff -r a97ad1663ef4 -r 3ff293cfdab8 src/http/modules/ngx_http_slice_filter_module.c --- a/src/http/modules/ngx_http_slice_filter_module.c Tue Mar 28 14:03:57 2017 +0300 +++ b/src/http/modules/ngx_http_slice_filter_module.c Fri Mar 31 21:47:56 2017 +0300 @@ -20,7 +20,8 @@ typedef struct { off_t end; ngx_str_t range; ngx_str_t etag; - ngx_uint_t last; /* unsigned last:1; */ + unsigned last:1; + unsigned active:1; ngx_http_request_t *sr; } ngx_http_slice_ctx_t; @@ -170,6 +171,7 @@ ngx_http_slice_header_filter(ngx_http_re } ctx->start = end; + ctx->active = 1; r->headers_out.status = NGX_HTTP_OK; r->headers_out.status_line.len = 0; @@ -238,6 +240,12 @@ ngx_http_slice_body_filter(ngx_http_requ return rc; } + if (!ctx->active) { + ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, + "missing slice response"); + return NGX_ERROR; + } + if (ctx->start >= ctx->end) { ngx_http_set_ctx(r, NULL, ngx_http_slice_filter_module); ngx_http_send_special(r, NGX_HTTP_LAST); @@ -263,6 +271,8 @@ ngx_http_slice_body_filter(ngx_http_requ ctx->start + (off_t) slcf->size - 1) - ctx->range.data; + ctx->active = 0; + ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "http slice subrequest: \"%V\"", &ctx->range); From igor at sysoev.ru Mon Apr 3 12:11:09 2017 From: igor at sysoev.ru (Igor Sysoev) Date: Mon, 03 Apr 2017 12:11:09 +0000 Subject: [njs] Large indexes processing has been fixed in Message-ID: details: http://hg.nginx.org/njs/rev/8f59eeb8ee2d branches: changeset: 327:8f59eeb8ee2d user: Igor Sysoev date: Sat Apr 01 15:32:04 2017 +0300 description: Large indexes processing has been fixed in Array.prototype.reduceRight(). diffstat: njs/njs_array.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r dc8af19bf47d -r 8f59eeb8ee2d njs/njs_array.c --- a/njs/njs_array.c Fri Mar 31 14:05:44 2017 +0300 +++ b/njs/njs_array.c Sat Apr 01 15:32:04 2017 +0300 @@ -1716,7 +1716,7 @@ njs_array_prototype_reduce_right_continu iter = njs_vm_continuation(vm); - if ((int32_t) iter->next_index < 0) { + if (iter->next_index == NJS_ARRAY_INVALID_INDEX) { vm->retval = iter->retval; return NXT_OK; } From igor at sysoev.ru Mon Apr 3 12:11:11 2017 From: igor at sysoev.ru (Igor Sysoev) Date: Mon, 03 Apr 2017 12:11:11 +0000 Subject: [njs] Array iterators optimizations. Message-ID: details: http://hg.nginx.org/njs/rev/cee288760080 branches: changeset: 328:cee288760080 user: Igor Sysoev date: Sun Apr 02 12:35:11 2017 +0300 description: Array iterators optimizations. diffstat: njs/njs_array.c | 221 +++++++++++++++++++++++++--------------------- njs/test/njs_unit_test.c | 4 + 2 files changed, 122 insertions(+), 103 deletions(-) diffs (498 lines): diff -r 8f59eeb8ee2d -r cee288760080 njs/njs_array.c --- a/njs/njs_array.c Sat Apr 01 15:32:04 2017 +0300 +++ b/njs/njs_array.c Sun Apr 02 12:35:11 2017 +0300 @@ -44,7 +44,7 @@ typedef struct { */ njs_value_t retval; - uint32_t next_index; + uint32_t index; uint32_t length; } njs_array_iter_t; @@ -59,7 +59,6 @@ typedef struct { typedef struct { njs_array_iter_t iter; njs_array_t *array; - uint32_t index; } njs_array_map_t; @@ -95,17 +94,20 @@ static njs_ret_t njs_array_prototype_fil njs_value_t *args, nxt_uint_t nargs, njs_index_t unused); static njs_ret_t njs_array_prototype_map_continuation(njs_vm_t *vm, njs_value_t *args, nxt_uint_t nargs, njs_index_t unused); +static nxt_noinline uint32_t njs_array_prototype_map_index(njs_array_t *array, + njs_array_map_t *map); +static nxt_noinline njs_ret_t njs_array_iterator_args(njs_vm_t *vm, + njs_value_t *args, nxt_uint_t nargs); +static nxt_noinline uint32_t njs_array_iterator_index(njs_array_t *array, + njs_array_iter_t *iter); +static nxt_noinline njs_ret_t njs_array_iterator_apply(njs_vm_t *vm, + njs_array_iter_t *iter, njs_value_t *args, nxt_uint_t nargs); static njs_ret_t njs_array_prototype_reduce_continuation(njs_vm_t *vm, njs_value_t *args, nxt_uint_t nargs, njs_index_t unused); static njs_ret_t njs_array_prototype_reduce_right_continuation(njs_vm_t *vm, njs_value_t *args, nxt_uint_t nargs, njs_index_t unused); -static nxt_noinline njs_ret_t njs_array_iterator_args(njs_vm_t *vm, - njs_value_t *args, nxt_uint_t nargs); -static nxt_noinline uint32_t njs_array_iterator_next(njs_array_t *array, - uint32_t n, uint32_t length); -static nxt_noinline njs_ret_t njs_array_iterator_apply(njs_vm_t *vm, - njs_array_iter_t *iter, njs_value_t *args, nxt_uint_t nargs); -static uint32_t njs_array_reduce_right_next(njs_array_t *array, uint32_t n); +static uint32_t njs_array_reduce_right_index(njs_array_t *array, + njs_array_iter_t *iter); static njs_ret_t njs_array_prototype_sort_continuation(njs_vm_t *vm, njs_value_t *args, nxt_uint_t nargs, njs_index_t unused); @@ -1222,11 +1224,14 @@ static njs_ret_t njs_array_prototype_for_each_continuation(njs_vm_t *vm, njs_value_t *args, nxt_uint_t nargs, njs_index_t unused) { + uint32_t index; njs_array_iter_t *iter; iter = njs_vm_continuation(vm); - if (iter->next_index >= args[0].data.u.array->length) { + index = njs_array_iterator_index(args[0].data.u.array, iter); + + if (index == NJS_ARRAY_INVALID_INDEX) { vm->retval = njs_value_void; return NXT_OK; } @@ -1259,6 +1264,7 @@ static njs_ret_t njs_array_prototype_some_continuation(njs_vm_t *vm, njs_value_t *args, nxt_uint_t nargs, njs_index_t unused) { + uint32_t index; njs_array_iter_t *iter; const njs_value_t *retval; @@ -1267,11 +1273,15 @@ njs_array_prototype_some_continuation(nj if (njs_is_true(&iter->retval)) { retval = &njs_value_true; - } else if (iter->next_index >= args[0].data.u.array->length) { - retval = &njs_value_false; - } else { - return njs_array_iterator_apply(vm, iter, args, nargs); + index = njs_array_iterator_index(args[0].data.u.array, iter); + + if (index == NJS_ARRAY_INVALID_INDEX) { + retval = &njs_value_false; + + } else { + return njs_array_iterator_apply(vm, iter, args, nargs); + } } vm->retval = *retval; @@ -1304,6 +1314,7 @@ static njs_ret_t njs_array_prototype_every_continuation(njs_vm_t *vm, njs_value_t *args, nxt_uint_t nargs, njs_index_t unused) { + uint32_t index; njs_array_iter_t *iter; const njs_value_t *retval; @@ -1312,11 +1323,15 @@ njs_array_prototype_every_continuation(n if (!njs_is_true(&iter->retval)) { retval = &njs_value_false; - } else if (iter->next_index >= args[0].data.u.array->length) { - retval = &njs_value_true; - } else { - return njs_array_iterator_apply(vm, iter, args, nargs); + index = njs_array_iterator_index(args[0].data.u.array, iter); + + if (index == NJS_ARRAY_INVALID_INDEX) { + retval = &njs_value_true; + + } else { + return njs_array_iterator_apply(vm, iter, args, nargs); + } } vm->retval = *retval; @@ -1417,6 +1432,7 @@ static njs_ret_t njs_array_prototype_filter_continuation(njs_vm_t *vm, njs_value_t *args, nxt_uint_t nargs, njs_index_t unused) { + uint32_t index; nxt_int_t ret; njs_array_t *array; njs_array_filter_t *filter; @@ -1431,8 +1447,9 @@ njs_array_prototype_filter_continuation( } array = args[0].data.u.array; - - if (filter->iter.next_index >= array->length) { + index = njs_array_iterator_index(array, &filter->iter); + + if (index == NJS_ARRAY_INVALID_INDEX) { vm->retval.data.u.array = filter->array; vm->retval.type = NJS_ARRAY; vm->retval.data.truth = 1; @@ -1441,7 +1458,7 @@ njs_array_prototype_filter_continuation( } /* GC: filter->value */ - filter->value = array->start[filter->iter.next_index]; + filter->value = array->start[index]; return njs_array_iterator_apply(vm, &filter->iter, args, nargs); } @@ -1451,10 +1468,7 @@ static njs_ret_t njs_array_prototype_map(njs_vm_t *vm, njs_value_t *args, nxt_uint_t nargs, njs_index_t unused) { - size_t size; nxt_int_t ret; - njs_value_t *value; - njs_array_t *array; njs_array_map_t *map; ret = njs_array_iterator_args(vm, args, nargs); @@ -1466,39 +1480,31 @@ njs_array_prototype_map(njs_vm_t *vm, nj map->iter.u.cont.function = njs_array_prototype_map_continuation; njs_set_invalid(&map->iter.retval); - array = args[0].data.u.array; - - map->array = njs_array_alloc(vm, array->length, 0); + map->array = njs_array_alloc(vm, args[0].data.u.array->length, 0); if (nxt_slow_path(map->array == NULL)) { return NXT_ERROR; } - value = map->array->start; - size = array->length; - - while (size != 0) { - njs_set_invalid(value); - value++; - size--; - } - return njs_array_prototype_map_continuation(vm, args, nargs, unused); } -static njs_ret_t +static nxt_noinline njs_ret_t njs_array_prototype_map_continuation(njs_vm_t *vm, njs_value_t *args, nxt_uint_t nargs, njs_index_t unused) { + uint32_t index; njs_array_map_t *map; map = njs_vm_continuation(vm); if (njs_is_valid(&map->iter.retval)) { - map->array->start[map->index] = map->iter.retval; + map->array->start[map->iter.index] = map->iter.retval; } - if (map->iter.next_index >= args[0].data.u.array->length) { + index = njs_array_prototype_map_index(args[0].data.u.array, map); + + if (index == NJS_ARRAY_INVALID_INDEX) { vm->retval.data.u.array = map->array; vm->retval.type = NJS_ARRAY; vm->retval.data.truth = 1; @@ -1506,12 +1512,36 @@ njs_array_prototype_map_continuation(njs return NXT_OK; } - map->index = map->iter.next_index; - return njs_array_iterator_apply(vm, &map->iter, args, nargs); } +static uint32_t +njs_array_prototype_map_index(njs_array_t *array, njs_array_map_t *map) +{ + uint32_t i, length; + njs_value_t *start; + + start = map->array->start; + length = nxt_min(array->length, map->iter.length); + + for (i = map->iter.index + 1; i < length; i++) { + if (njs_is_valid(&array->start[i])) { + map->iter.index = i; + return i; + } + + njs_set_invalid(&start[i]); + } + + while (i < map->iter.length) { + njs_set_invalid(&start[i++]); + } + + return NJS_ARRAY_INVALID_INDEX; +} + + static njs_ret_t njs_array_prototype_reduce(njs_vm_t *vm, njs_value_t *args, nxt_uint_t nargs, njs_index_t unused) @@ -1534,16 +1564,14 @@ njs_array_prototype_reduce(njs_vm_t *vm, } else { array = args[0].data.u.array; - n = iter->next_index; - - if (n >= array->length) { + n = njs_array_iterator_index(array, iter); + + if (n == NJS_ARRAY_INVALID_INDEX) { vm->exception = &njs_exception_type_error; return NXT_ERROR; } iter->retval = array->start[n]; - - iter->next_index = njs_array_iterator_next(array, n + 1, array->length); } return njs_array_prototype_reduce_continuation(vm, args, nargs, unused); @@ -1560,8 +1588,11 @@ njs_array_prototype_reduce_continuation( njs_array_iter_t *iter; iter = njs_vm_continuation(vm); - - if (iter->next_index >= args[0].data.u.array->length) { + array = args[0].data.u.array; + + n = njs_array_iterator_index(array, iter); + + if (n == NJS_ARRAY_INVALID_INDEX) { vm->retval = iter->retval; return NXT_OK; } @@ -1571,17 +1602,12 @@ njs_array_prototype_reduce_continuation( /* GC: array elt, array */ arguments[1] = iter->retval; - array = args[0].data.u.array; - n = iter->next_index; - arguments[2] = array->start[n]; njs_number_set(&arguments[3], n); arguments[4] = args[0]; - iter->next_index = njs_array_iterator_next(array, n + 1, iter->length); - return njs_function_apply(vm, args[1].data.u.function, arguments, 5, (njs_index_t) &iter->retval); } @@ -1590,15 +1616,13 @@ njs_array_prototype_reduce_continuation( static nxt_noinline njs_ret_t njs_array_iterator_args(njs_vm_t *vm, njs_value_t *args, nxt_uint_t nargs) { - njs_array_t *array; njs_array_iter_t *iter; if (nargs > 1 && njs_is_array(&args[0]) && njs_is_function(&args[1])) { - array = args[0].data.u.array; iter = njs_vm_continuation(vm); - iter->length = array->length; - iter->next_index = njs_array_iterator_next(array, 0, array->length); + iter->length = args[0].data.u.array->length; + iter->index = NJS_ARRAY_INVALID_INDEX; return NXT_OK; } @@ -1610,16 +1634,17 @@ njs_array_iterator_args(njs_vm_t *vm, nj static nxt_noinline uint32_t -njs_array_iterator_next(njs_array_t *array, uint32_t n, uint32_t length) +njs_array_iterator_index(njs_array_t *array, njs_array_iter_t *iter) { - length = nxt_min(length, array->length); - - while (n < length) { - if (njs_is_valid(&array->start[n])) { - return n; + uint32_t i, length; + + length = nxt_min(array->length, iter->length); + + for (i = iter->index + 1; i < length; i++) { + if (njs_is_valid(&array->start[i])) { + iter->index = i; + return i; } - - n++; } return NJS_ARRAY_INVALID_INDEX; @@ -1630,33 +1655,22 @@ static nxt_noinline njs_ret_t njs_array_iterator_apply(njs_vm_t *vm, njs_array_iter_t *iter, njs_value_t *args, nxt_uint_t nargs) { - uint32_t n; - njs_array_t *array; - njs_value_t arguments[4]; - - /* - * The cast "*(njs_value_t *) &" is required by SunC. - * Simple "(njs_value_t)" does not help. - */ - arguments[0] = (nargs > 2) ? args[2] : *(njs_value_t *) &njs_value_void; + uint32_t n; + const njs_value_t *value; + njs_value_t arguments[4]; + /* GC: array elt, array */ - /* - * All array iterators functions call njs_array_iterator_args() - * function which set a correct iter->next_index value. A large - * value of iter->next_index must be checked before calling - * njs_array_iterator_apply(). - */ - array = args[0].data.u.array; - n = iter->next_index; - arguments[1] = array->start[n]; + value = (nargs > 2) ? &args[2] : &njs_value_void; + arguments[0] = *value; + + n = iter->index; + arguments[1] = args[0].data.u.array->start[n]; njs_number_set(&arguments[2], n); arguments[3] = args[0]; - iter->next_index = njs_array_iterator_next(array, n + 1, iter->length); - return njs_function_apply(vm, args[1].data.u.function, arguments, 4, (njs_index_t) &iter->retval); } @@ -1667,32 +1681,30 @@ njs_array_prototype_reduce_right(njs_vm_ nxt_uint_t nargs, njs_index_t unused) { uint32_t n; + njs_ret_t ret; njs_array_t *array; njs_array_iter_t *iter; - if (nargs < 2 || !njs_is_array(&args[0]) || !njs_is_function(&args[1])) { - goto type_error; + ret = njs_array_iterator_args(vm, args, nargs); + if (nxt_slow_path(ret != NXT_OK)) { + return ret; } iter = njs_vm_continuation(vm); iter->u.cont.function = njs_array_prototype_reduce_right_continuation; - array = args[0].data.u.array; - iter->next_index = njs_array_reduce_right_next(array, array->length); - if (nargs > 2) { iter->retval = args[2]; } else { - n = iter->next_index; + array = args[0].data.u.array; + n = njs_array_reduce_right_index(array, iter); if (n == NJS_ARRAY_INVALID_INDEX) { goto type_error; } iter->retval = array->start[n]; - - iter->next_index = njs_array_reduce_right_next(array, n); } return njs_array_prototype_reduce_right_continuation(vm, args, nargs, @@ -1705,7 +1717,7 @@ type_error: } -static njs_ret_t +static nxt_noinline njs_ret_t njs_array_prototype_reduce_right_continuation(njs_vm_t *vm, njs_value_t *args, nxt_uint_t nargs, njs_index_t unused) { @@ -1715,8 +1727,11 @@ njs_array_prototype_reduce_right_continu njs_array_iter_t *iter; iter = njs_vm_continuation(vm); - - if (iter->next_index == NJS_ARRAY_INVALID_INDEX) { + array = args[0].data.u.array; + + n = njs_array_reduce_right_index(array, iter); + + if (n == NJS_ARRAY_INVALID_INDEX) { vm->retval = iter->retval; return NXT_OK; } @@ -1726,29 +1741,29 @@ njs_array_prototype_reduce_right_continu /* GC: array elt, array */ arguments[1] = iter->retval; - array = args[0].data.u.array; - n = iter->next_index; arguments[2] = array->start[n]; njs_number_set(&arguments[3], n); arguments[4] = args[0]; - iter->next_index = njs_array_reduce_right_next(array, n); - return njs_function_apply(vm, args[1].data.u.function, arguments, 5, (njs_index_t) &iter->retval); } static nxt_noinline uint32_t -njs_array_reduce_right_next(njs_array_t *array, uint32_t n) +njs_array_reduce_right_index(njs_array_t *array, njs_array_iter_t *iter) { - n = nxt_min(n, array->length) - 1; + uint32_t n; + + n = nxt_min(iter->index, array->length) - 1; while (n != NJS_ARRAY_INVALID_INDEX) { + if (njs_is_valid(&array->start[n])) { - return n; + iter->index = n; + break; } n--; diff -r 8f59eeb8ee2d -r cee288760080 njs/test/njs_unit_test.c --- a/njs/test/njs_unit_test.c Sat Apr 01 15:32:04 2017 +0300 +++ b/njs/test/njs_unit_test.c Sun Apr 02 12:35:11 2017 +0300 @@ -2903,6 +2903,10 @@ static njs_unit_test_t njs_test[] = "a.map(function(v, i, a) { a.pop(); return v + 1 })"), nxt_string("2,3,4,,,") }, + { nxt_string("var a = [1,2,3,4,5,6];" + "a.map(function(v, i, a) { a.shift(); return v + 1 })"), + nxt_string("2,4,6,,,") }, + { nxt_string("var a = [];" "a.reduce(function(p, v, i, a) { return p + v })"), nxt_string("TypeError") }, From igor at sysoev.ru Mon Apr 3 12:11:13 2017 From: igor at sysoev.ru (Igor Sysoev) Date: Mon, 03 Apr 2017 12:11:13 +0000 Subject: [njs] Variables may be accessed incorrectly by nested functions. Message-ID: details: http://hg.nginx.org/njs/rev/c46da90ca064 branches: changeset: 329:c46da90ca064 user: Igor Sysoev date: Sun Apr 02 12:36:05 2017 +0300 description: Variables may be accessed incorrectly by nested functions. diffstat: njs/njs_parser.c | 5 +++++ njs/test/njs_unit_test.c | 5 +++++ 2 files changed, 10 insertions(+), 0 deletions(-) diffs (30 lines): diff -r cee288760080 -r c46da90ca064 njs/njs_parser.c --- a/njs/njs_parser.c Sun Apr 02 12:35:11 2017 +0300 +++ b/njs/njs_parser.c Sun Apr 02 12:36:05 2017 +0300 @@ -215,6 +215,11 @@ njs_parser_scope_begin(njs_vm_t *vm, njs if (parent != NULL) { nxt_queue_insert_tail(&parent->nested, &scope->link); + + if (nesting == 0) { + /* Inherit function nesting in blocks. */ + scope->nesting = parent->nesting; + } } return NXT_OK; diff -r cee288760080 -r c46da90ca064 njs/test/njs_unit_test.c --- a/njs/test/njs_unit_test.c Sun Apr 02 12:35:11 2017 +0300 +++ b/njs/test/njs_unit_test.c Sun Apr 02 12:36:05 2017 +0300 @@ -4221,6 +4221,11 @@ static njs_unit_test_t njs_test[] = "var y = f(); y()"), nxt_string("4") }, + { nxt_string("function f() { var x = 4;" + "function g() { if (1) { return 2 + x; } }; return g }" + "var y = f(); y()"), + nxt_string("6") }, + /* Recursive fibonacci. */ { nxt_string("function fibo(n) {" From mdounin at mdounin.ru Mon Apr 3 16:47:28 2017 From: mdounin at mdounin.ru (Maxim Dounin) Date: Mon, 03 Apr 2017 16:47:28 +0000 Subject: [nginx] Fixed type. Message-ID: details: http://hg.nginx.org/nginx/rev/5d3d9b52327d branches: changeset: 6964:5d3d9b52327d user: hucongcong date: Mon Apr 03 14:29:40 2017 +0800 description: Fixed type. diffstat: src/http/ngx_http_request.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (21 lines): diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -2612,7 +2612,7 @@ ngx_http_set_write_handler(ngx_http_requ static void ngx_http_writer(ngx_http_request_t *r) { - int rc; + ngx_int_t rc; ngx_event_t *wev; ngx_connection_t *c; ngx_http_core_loc_conf_t *clcf; @@ -2652,7 +2652,7 @@ ngx_http_writer(ngx_http_request_t *r) rc = ngx_http_output_filter(r, NULL); ngx_log_debug3(NGX_LOG_DEBUG_HTTP, c->log, 0, - "http writer output filter: %d, \"%V?%V\"", + "http writer output filter: %i, \"%V?%V\"", rc, &r->uri, &r->args); if (rc == NGX_ERROR) { From mdounin at mdounin.ru Mon Apr 3 16:47:41 2017 From: mdounin at mdounin.ru (Maxim Dounin) Date: Mon, 3 Apr 2017 19:47:41 +0300 Subject: [PATCH][bugfix] Upstream: clear the delayed flag to prevent blocking from sending. In-Reply-To: References: <20170402133555.GU13617@mdounin.ru> Message-ID: <20170403164741.GY13617@mdounin.ru> Hello! On Mon, Apr 03, 2017 at 04:02:07PM +0800, ?? (hucc) wrote: [...] > At the same time, I noticed that the type of rc is int not ngx_int_t in > ngx_http_writer(). The type should be ngx_int_t, right? There was a time the > return type of ngx_http_writer() is int. Later, it became void. Since then there > is no need to do type conversion. The "int" here was introduced at the time when there were no ngx_int_t and all functions simply used int. When ngx_int_t was introduced and relevant functions was changed to use it, the type in ngx_http_writer() wasn't changed. This isn't a problem as there is no real difference, though it certainly make sense to use correct type here at least from style point of view. > > # HG changeset patch > # User hucongcong > # Date 1491200980 -28800 > # Mon Apr 03 14:29:40 2017 +0800 > # Node ID 7c3a0b951d0209612fb50a48abcb10c6ceffbff7 > # Parent 903fb1ddc07f6b4345d88428898d95aadfc0223f > fix type > > diff -r 903fb1ddc07f -r 7c3a0b951d02 src/http/ngx_http_request.c > --- a/src/http/ngx_http_request.c Sun Apr 02 14:32:29 2017 +0300 > +++ b/src/http/ngx_http_request.c Mon Apr 03 14:29:40 2017 +0800 > @@ -2612,7 +2612,7 @@ ngx_http_set_write_handler(ngx_http_requ > static void > ngx_http_writer(ngx_http_request_t *r) > { > - int rc; > + ngx_int_t rc; > ngx_event_t *wev; > ngx_connection_t *c; > ngx_http_core_loc_conf_t *clcf; > @@ -2652,7 +2652,7 @@ ngx_http_writer(ngx_http_request_t *r) > rc = ngx_http_output_filter(r, NULL); > > ngx_log_debug3(NGX_LOG_DEBUG_HTTP, c->log, 0, > - "http writer output filter: %d, \"%V?%V\"", > + "http writer output filter: %i, \"%V?%V\"", > rc, &r->uri, &r->args); > > if (rc == NGX_ERROR) { Committed with the commit log changed to match our style, thanks. -- Maxim Dounin http://nginx.org/ From mdounin at mdounin.ru Mon Apr 3 17:19:38 2017 From: mdounin at mdounin.ru (Maxim Dounin) Date: Mon, 03 Apr 2017 17:19:38 +0000 Subject: [nginx] Added support for "429 Too Many Requests" response (RFC6585). Message-ID: details: http://hg.nginx.org/nginx/rev/3ef4cadfad7f branches: changeset: 6965:3ef4cadfad7f user: Piotr Sikora date: Fri Mar 24 02:48:03 2017 -0700 description: Added support for "429 Too Many Requests" response (RFC6585). This change adds reason phrase in status line and pretty response body when "429" status code is used in "return", "limit_conn_status" and/or "limit_req_status" directives. Signed-off-by: Piotr Sikora diffstat: src/http/ngx_http_header_filter_module.c | 14 +++++++++----- src/http/ngx_http_request.h | 1 + src/http/ngx_http_special_response.c | 18 +++++++++++++++++- 3 files changed, 27 insertions(+), 6 deletions(-) diffs (72 lines): diff --git a/src/http/ngx_http_header_filter_module.c b/src/http/ngx_http_header_filter_module.c --- a/src/http/ngx_http_header_filter_module.c +++ b/src/http/ngx_http_header_filter_module.c @@ -101,12 +101,16 @@ static ngx_str_t ngx_http_status_lines[] ngx_null_string, /* "419 unused" */ ngx_null_string, /* "420 unused" */ ngx_string("421 Misdirected Request"), + ngx_null_string, /* "422 Unprocessable Entity" */ + ngx_null_string, /* "423 Locked" */ + ngx_null_string, /* "424 Failed Dependency" */ + ngx_null_string, /* "425 unused" */ + ngx_null_string, /* "426 Upgrade Required" */ + ngx_null_string, /* "427 unused" */ + ngx_null_string, /* "428 Precondition Required" */ + ngx_string("429 Too Many Requests"), - /* ngx_null_string, */ /* "422 Unprocessable Entity" */ - /* ngx_null_string, */ /* "423 Locked" */ - /* ngx_null_string, */ /* "424 Failed Dependency" */ - -#define NGX_HTTP_LAST_4XX 422 +#define NGX_HTTP_LAST_4XX 430 #define NGX_HTTP_OFF_5XX (NGX_HTTP_LAST_4XX - 400 + NGX_HTTP_OFF_4XX) ngx_string("500 Internal Server Error"), diff --git a/src/http/ngx_http_request.h b/src/http/ngx_http_request.h --- a/src/http/ngx_http_request.h +++ b/src/http/ngx_http_request.h @@ -98,6 +98,7 @@ #define NGX_HTTP_UNSUPPORTED_MEDIA_TYPE 415 #define NGX_HTTP_RANGE_NOT_SATISFIABLE 416 #define NGX_HTTP_MISDIRECTED_REQUEST 421 +#define NGX_HTTP_TOO_MANY_REQUESTS 429 /* Our own HTTP codes */ diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c --- a/src/http/ngx_http_special_response.c +++ b/src/http/ngx_http_special_response.c @@ -225,6 +225,14 @@ static char ngx_http_error_421_page[] = ; +static char ngx_http_error_429_page[] = +"" CRLF +"429 Too Many Requests" CRLF +"" CRLF +"

429 Too Many Requests

" CRLF +; + + static char ngx_http_error_494_page[] = "" CRLF "400 Request Header Or Cookie Too Large" @@ -354,8 +362,16 @@ static ngx_str_t ngx_http_error_pages[] ngx_null_string, /* 419 */ ngx_null_string, /* 420 */ ngx_string(ngx_http_error_421_page), + ngx_null_string, /* 422 */ + ngx_null_string, /* 423 */ + ngx_null_string, /* 424 */ + ngx_null_string, /* 425 */ + ngx_null_string, /* 426 */ + ngx_null_string, /* 427 */ + ngx_null_string, /* 428 */ + ngx_string(ngx_http_error_429_page), -#define NGX_HTTP_LAST_4XX 422 +#define NGX_HTTP_LAST_4XX 430 #define NGX_HTTP_OFF_5XX (NGX_HTTP_LAST_4XX - 400 + NGX_HTTP_OFF_4XX) ngx_string(ngx_http_error_494_page), /* 494, request header too large */ From mdounin at mdounin.ru Mon Apr 3 17:19:41 2017 From: mdounin at mdounin.ru (Maxim Dounin) Date: Mon, 03 Apr 2017 17:19:41 +0000 Subject: [nginx] Upstream: allow recovery from "429 Too Many Requests" response. Message-ID: details: http://hg.nginx.org/nginx/rev/fa56ab75cffc branches: changeset: 6966:fa56ab75cffc user: Piotr Sikora date: Fri Mar 24 02:48:03 2017 -0700 description: Upstream: allow recovery from "429 Too Many Requests" response. This change adds "http_429" parameter to "proxy_next_upstream" for retrying rate-limited requests, and to "proxy_cache_use_stale" for serving stale cached responses after being rate-limited. Signed-off-by: Piotr Sikora diffstat: src/http/modules/ngx_http_fastcgi_module.c | 1 + src/http/modules/ngx_http_proxy_module.c | 1 + src/http/modules/ngx_http_scgi_module.c | 1 + src/http/modules/ngx_http_uwsgi_module.c | 1 + src/http/ngx_http_upstream.c | 5 +++++ src/http/ngx_http_upstream.h | 12 +++++++----- 6 files changed, 16 insertions(+), 5 deletions(-) diffs (95 lines): diff --git a/src/http/modules/ngx_http_fastcgi_module.c b/src/http/modules/ngx_http_fastcgi_module.c --- a/src/http/modules/ngx_http_fastcgi_module.c +++ b/src/http/modules/ngx_http_fastcgi_module.c @@ -211,6 +211,7 @@ static ngx_conf_bitmask_t ngx_http_fast { ngx_string("http_503"), NGX_HTTP_UPSTREAM_FT_HTTP_503 }, { ngx_string("http_403"), NGX_HTTP_UPSTREAM_FT_HTTP_403 }, { ngx_string("http_404"), NGX_HTTP_UPSTREAM_FT_HTTP_404 }, + { ngx_string("http_429"), NGX_HTTP_UPSTREAM_FT_HTTP_429 }, { ngx_string("updating"), NGX_HTTP_UPSTREAM_FT_UPDATING }, { ngx_string("off"), NGX_HTTP_UPSTREAM_FT_OFF }, { ngx_null_string, 0 } diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c --- a/src/http/modules/ngx_http_proxy_module.c +++ b/src/http/modules/ngx_http_proxy_module.c @@ -220,6 +220,7 @@ static ngx_conf_bitmask_t ngx_http_prox { ngx_string("http_504"), NGX_HTTP_UPSTREAM_FT_HTTP_504 }, { ngx_string("http_403"), NGX_HTTP_UPSTREAM_FT_HTTP_403 }, { ngx_string("http_404"), NGX_HTTP_UPSTREAM_FT_HTTP_404 }, + { ngx_string("http_429"), NGX_HTTP_UPSTREAM_FT_HTTP_429 }, { ngx_string("updating"), NGX_HTTP_UPSTREAM_FT_UPDATING }, { ngx_string("off"), NGX_HTTP_UPSTREAM_FT_OFF }, { ngx_null_string, 0 } diff --git a/src/http/modules/ngx_http_scgi_module.c b/src/http/modules/ngx_http_scgi_module.c --- a/src/http/modules/ngx_http_scgi_module.c +++ b/src/http/modules/ngx_http_scgi_module.c @@ -82,6 +82,7 @@ static ngx_conf_bitmask_t ngx_http_scgi_ { ngx_string("http_503"), NGX_HTTP_UPSTREAM_FT_HTTP_503 }, { ngx_string("http_403"), NGX_HTTP_UPSTREAM_FT_HTTP_403 }, { ngx_string("http_404"), NGX_HTTP_UPSTREAM_FT_HTTP_404 }, + { ngx_string("http_429"), NGX_HTTP_UPSTREAM_FT_HTTP_429 }, { ngx_string("updating"), NGX_HTTP_UPSTREAM_FT_UPDATING }, { ngx_string("off"), NGX_HTTP_UPSTREAM_FT_OFF }, { ngx_null_string, 0 } diff --git a/src/http/modules/ngx_http_uwsgi_module.c b/src/http/modules/ngx_http_uwsgi_module.c --- a/src/http/modules/ngx_http_uwsgi_module.c +++ b/src/http/modules/ngx_http_uwsgi_module.c @@ -114,6 +114,7 @@ static ngx_conf_bitmask_t ngx_http_uwsgi { ngx_string("http_503"), NGX_HTTP_UPSTREAM_FT_HTTP_503 }, { ngx_string("http_403"), NGX_HTTP_UPSTREAM_FT_HTTP_403 }, { ngx_string("http_404"), NGX_HTTP_UPSTREAM_FT_HTTP_404 }, + { ngx_string("http_429"), NGX_HTTP_UPSTREAM_FT_HTTP_429 }, { ngx_string("updating"), NGX_HTTP_UPSTREAM_FT_UPDATING }, { ngx_string("off"), NGX_HTTP_UPSTREAM_FT_OFF }, { ngx_null_string, 0 } diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -436,6 +436,7 @@ static ngx_http_upstream_next_t ngx_htt { 504, NGX_HTTP_UPSTREAM_FT_HTTP_504 }, { 403, NGX_HTTP_UPSTREAM_FT_HTTP_403 }, { 404, NGX_HTTP_UPSTREAM_FT_HTTP_404 }, + { 429, NGX_HTTP_UPSTREAM_FT_HTTP_429 }, { 0, 0 } }; @@ -4126,6 +4127,10 @@ ngx_http_upstream_next(ngx_http_request_ status = NGX_HTTP_NOT_FOUND; break; + case NGX_HTTP_UPSTREAM_FT_HTTP_429: + status = NGX_HTTP_TOO_MANY_REQUESTS; + break; + /* * NGX_HTTP_UPSTREAM_FT_BUSY_LOCK and NGX_HTTP_UPSTREAM_FT_MAX_WAITING * never reach here diff --git a/src/http/ngx_http_upstream.h b/src/http/ngx_http_upstream.h --- a/src/http/ngx_http_upstream.h +++ b/src/http/ngx_http_upstream.h @@ -26,10 +26,11 @@ #define NGX_HTTP_UPSTREAM_FT_HTTP_504 0x00000080 #define NGX_HTTP_UPSTREAM_FT_HTTP_403 0x00000100 #define NGX_HTTP_UPSTREAM_FT_HTTP_404 0x00000200 -#define NGX_HTTP_UPSTREAM_FT_UPDATING 0x00000400 -#define NGX_HTTP_UPSTREAM_FT_BUSY_LOCK 0x00000800 -#define NGX_HTTP_UPSTREAM_FT_MAX_WAITING 0x00001000 -#define NGX_HTTP_UPSTREAM_FT_NON_IDEMPOTENT 0x00002000 +#define NGX_HTTP_UPSTREAM_FT_HTTP_429 0x00000400 +#define NGX_HTTP_UPSTREAM_FT_UPDATING 0x00000800 +#define NGX_HTTP_UPSTREAM_FT_BUSY_LOCK 0x00001000 +#define NGX_HTTP_UPSTREAM_FT_MAX_WAITING 0x00002000 +#define NGX_HTTP_UPSTREAM_FT_NON_IDEMPOTENT 0x00004000 #define NGX_HTTP_UPSTREAM_FT_NOLIVE 0x40000000 #define NGX_HTTP_UPSTREAM_FT_OFF 0x80000000 @@ -38,7 +39,8 @@ |NGX_HTTP_UPSTREAM_FT_HTTP_503 \ |NGX_HTTP_UPSTREAM_FT_HTTP_504 \ |NGX_HTTP_UPSTREAM_FT_HTTP_403 \ - |NGX_HTTP_UPSTREAM_FT_HTTP_404) + |NGX_HTTP_UPSTREAM_FT_HTTP_404 \ + |NGX_HTTP_UPSTREAM_FT_HTTP_429) #define NGX_HTTP_UPSTREAM_INVALID_HEADER 40 From mdounin at mdounin.ru Mon Apr 3 17:19:49 2017 From: mdounin at mdounin.ru (Maxim Dounin) Date: Mon, 3 Apr 2017 20:19:49 +0300 Subject: [PATCH 1 of 2] HTTP: add support for "429 Too Many Requests" response (RFC6585) In-Reply-To: <799ef976b58cadbc212b.1490352460@piotrsikora.sfo.corp.google.com> References: <799ef976b58cadbc212b.1490352460@piotrsikora.sfo.corp.google.com> Message-ID: <20170403171948.GZ13617@mdounin.ru> Hello! On Fri, Mar 24, 2017 at 03:47:40AM -0700, Piotr Sikora via nginx-devel wrote: > # HG changeset patch > # User Piotr Sikora > # Date 1490348883 25200 > # Fri Mar 24 02:48:03 2017 -0700 > # Node ID 799ef976b58cadbc212bd790a666033d3777c10d > # Parent 39ff6939266e913e8bfd400e60f9520e70725a4d > HTTP: add support for "429 Too Many Requests" response (RFC6585). > > This change adds reason phrase in status line and pretty response body > when "429" status code is used in "return", "limit_conn_status" and/or > "limit_req_status" directives. > > Signed-off-by: Piotr Sikora We do not use "HTTP:" prefix, and prefer past tense in commit messages. Overwise looks good, committed, thanks. [...] -- Maxim Dounin http://nginx.org/ From mdounin at mdounin.ru Mon Apr 3 17:20:05 2017 From: mdounin at mdounin.ru (Maxim Dounin) Date: Mon, 3 Apr 2017 20:20:05 +0300 Subject: [PATCH 2 of 2] Upstream: allow recovery from "429 Too Many Requests" response In-Reply-To: References: <799ef976b58cadbc212b.1490352460@piotrsikora.sfo.corp.google.com> Message-ID: <20170403172005.GA13617@mdounin.ru> Hello! On Fri, Mar 24, 2017 at 03:47:41AM -0700, Piotr Sikora via nginx-devel wrote: > # HG changeset patch > # User Piotr Sikora > # Date 1490348883 25200 > # Fri Mar 24 02:48:03 2017 -0700 > # Node ID b377cfedf632b14a3d459e12342a0557a25a790c > # Parent 799ef976b58cadbc212bd790a666033d3777c10d > Upstream: allow recovery from "429 Too Many Requests" response. > > This change adds "http_429" parameter to "proxy_next_upstream" for > retrying rate-limited requests, and to "proxy_cache_use_stale" for > serving stale cached responses after being rate-limited. > > Signed-off-by: Piotr Sikora [...] Committed, thanks. -- Maxim Dounin http://nginx.org/ From piotrsikora at google.com Tue Apr 4 03:13:34 2017 From: piotrsikora at google.com (Piotr Sikora) Date: Mon, 03 Apr 2017 20:13:34 -0700 Subject: [PATCH] HTTP/2: add debug logging of pseudo-headers Message-ID: <3d72ae17c41990774721.1491275614@piotrsikora.sfo.corp.google.com> # HG changeset patch # User Piotr Sikora # Date 1490516711 25200 # Sun Mar 26 01:25:11 2017 -0700 # Node ID 3d72ae17c41990774721a678c50b8307ecb684c8 # Parent 22be63bf21edaa1b8ea916c7d8cd4e5fe4892061 HTTP/2: add debug logging of pseudo-headers. Signed-off-by: Piotr Sikora diff -r 22be63bf21ed -r 3d72ae17c419 src/http/v2/ngx_http_v2.c --- a/src/http/v2/ngx_http_v2.c +++ b/src/http/v2/ngx_http_v2.c @@ -1585,6 +1585,10 @@ ngx_http_v2_state_process_header(ngx_htt rc = ngx_http_v2_pseudo_header(r, header); if (rc == NGX_OK) { + ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, + "http2 http header: \":%V: %V\"", + &header->name, &header->value); + return ngx_http_v2_state_header_complete(h2c, pos, end); } From piotrsikora at google.com Tue Apr 4 03:13:40 2017 From: piotrsikora at google.com (Piotr Sikora) Date: Mon, 03 Apr 2017 20:13:40 -0700 Subject: [PATCH] HTTP/2: add debug logging of control frames Message-ID: <06d6418afe6e73604aea.1491275620@piotrsikora.sfo.corp.google.com> # HG changeset patch # User Piotr Sikora # Date 1490516711 25200 # Sun Mar 26 01:25:11 2017 -0700 # Node ID 06d6418afe6e73604aea707ef9c5802f5bf27bf4 # Parent 22be63bf21edaa1b8ea916c7d8cd4e5fe4892061 HTTP/2: add debug logging of control frames. Signed-off-by: Piotr Sikora diff -r 22be63bf21ed -r 06d6418afe6e src/http/v2/ngx_http_v2.c --- a/src/http/v2/ngx_http_v2.c +++ b/src/http/v2/ngx_http_v2.c @@ -1955,6 +1955,9 @@ ngx_http_v2_state_settings(ngx_http_v2_c return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_SIZE_ERROR); } + ngx_log_debug0(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 SETTINGS frame ack:1"); + h2c->settings_ack = 1; return ngx_http_v2_state_complete(h2c, pos, end); @@ -1968,6 +1971,10 @@ ngx_http_v2_state_settings(ngx_http_v2_c return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_SIZE_ERROR); } + ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 SETTINGS frame params:%uz", + h2c->state.length / NGX_HTTP_V2_SETTINGS_PARAM_SIZE); + ngx_http_v2_send_settings(h2c, 1); return ngx_http_v2_state_settings_params(h2c, pos, end); @@ -2004,6 +2011,10 @@ ngx_http_v2_state_settings_params(ngx_ht NGX_HTTP_V2_FLOW_CTRL_ERROR); } + ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 SETTINGS frame INITIAL_WINDOW_SIZE:%ui", + value); + if (ngx_http_v2_adjust_windows(h2c, value - h2c->init_window) != NGX_OK) { @@ -2026,6 +2037,10 @@ ngx_http_v2_state_settings_params(ngx_ht NGX_HTTP_V2_PROTOCOL_ERROR); } + ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 SETTINGS frame MAX_FRAME_SIZE:%ui", + value); + h2c->frame_size = value; break; @@ -2070,12 +2085,16 @@ ngx_http_v2_state_ping(ngx_http_v2_conne } ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, - "http2 PING frame, flags: %ud", h2c->state.flags); + "http2 PING frame ack:%ud", + h2c->state.flags & NGX_HTTP_V2_ACK_FLAG ? 1 : 0); if (h2c->state.flags & NGX_HTTP_V2_ACK_FLAG) { return ngx_http_v2_state_skip(h2c, pos, end); } + ngx_log_debug0(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 send PING frame ack:1"); + frame = ngx_http_v2_get_frame(h2c, NGX_HTTP_V2_PING_SIZE, NGX_HTTP_V2_PING_FRAME, NGX_HTTP_V2_ACK_FLAG, 0); @@ -2449,8 +2468,18 @@ ngx_http_v2_send_settings(ngx_http_v2_co ngx_http_v2_srv_conf_t *h2scf; ngx_http_v2_out_frame_t *frame; - ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, - "http2 send SETTINGS frame ack:%ui", ack); + if (ack) { + ngx_log_debug0(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 send SETTINGS frame ack:1"); + + len = 0; + + } else { + ngx_log_debug0(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 send SETTINGS frame params:3"); + + len = NGX_HTTP_V2_SETTINGS_PARAM_SIZE * 3; + } frame = ngx_palloc(h2c->pool, sizeof(ngx_http_v2_out_frame_t)); if (frame == NULL) { @@ -2462,8 +2491,6 @@ ngx_http_v2_send_settings(ngx_http_v2_co return NGX_ERROR; } - len = ack ? 0 : (sizeof(uint16_t) + sizeof(uint32_t)) * 3; - buf = ngx_create_temp_buf(h2c->pool, NGX_HTTP_V2_FRAME_HEADER_SIZE + len); if (buf == NULL) { return NGX_ERROR; @@ -2494,15 +2521,27 @@ ngx_http_v2_send_settings(ngx_http_v2_co h2scf = ngx_http_get_module_srv_conf(h2c->http_connection->conf_ctx, ngx_http_v2_module); + ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 send SETTINGS frame MAX_CONCURRENT_STREAMS:%ui", + h2scf->concurrent_streams); + buf->last = ngx_http_v2_write_uint16(buf->last, NGX_HTTP_V2_MAX_STREAMS_SETTING); buf->last = ngx_http_v2_write_uint32(buf->last, h2scf->concurrent_streams); + ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 send SETTINGS frame INITIAL_WINDOW_SIZE:%uz", + h2scf->preread_size); + buf->last = ngx_http_v2_write_uint16(buf->last, NGX_HTTP_V2_INIT_WINDOW_SIZE_SETTING); buf->last = ngx_http_v2_write_uint32(buf->last, h2scf->preread_size); + ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 send SETTINGS frame MAX_FRAME_SIZE:%ud", + NGX_HTTP_V2_MAX_FRAME_SIZE); + buf->last = ngx_http_v2_write_uint16(buf->last, NGX_HTTP_V2_MAX_FRAME_SIZE_SETTING); buf->last = ngx_http_v2_write_uint32(buf->last, From piotrsikora at google.com Tue Apr 4 03:15:11 2017 From: piotrsikora at google.com (Piotr Sikora) Date: Mon, 3 Apr 2017 20:15:11 -0700 Subject: [PATCH] HTTP/2: add debug logging of pseudo-headers and control frames In-Reply-To: <6990fb6463ce47705e06.1490517681@piotrsikora.sfo.corp.google.com> References: <6990fb6463ce47705e06.1490517681@piotrsikora.sfo.corp.google.com> Message-ID: Hey, > # HG changeset patch > # User Piotr Sikora > # Date 1490516711 25200 > # Sun Mar 26 01:25:11 2017 -0700 > # Node ID 6990fb6463ce47705e06ff6d0fbd9ae6696aeb37 > # Parent 22be63bf21edaa1b8ea916c7d8cd4e5fe4892061 > HTTP/2: add debug logging of pseudo-headers and control frames. > > Signed-off-by: Piotr Sikora This was split into: http://mailman.nginx.org/pipermail/nginx-devel/2017-April/009767.html http://mailman.nginx.org/pipermail/nginx-devel/2017-April/009768.html Best regards, Piotr Sikora From igor at sysoev.ru Tue Apr 4 10:24:34 2017 From: igor at sysoev.ru (Igor Sysoev) Date: Tue, 04 Apr 2017 10:24:34 +0000 Subject: [njs] Array.prototype.find() method. Message-ID: details: http://hg.nginx.org/njs/rev/52d53653ac52 branches: changeset: 330:52d53653ac52 user: Andrey Zelenkov date: Tue Apr 04 06:10:10 2017 +0300 description: Array.prototype.find() method. Also introduced njs_array_iterator_sparse_apply() function. diffstat: njs/njs_array.c | 106 +++++++++++++++++++++++++++++++++++++++++++++++ njs/test/njs_unit_test.c | 43 +++++++++++++++++++ 2 files changed, 149 insertions(+), 0 deletions(-) diffs (197 lines): diff -r c46da90ca064 -r 52d53653ac52 njs/njs_array.c --- a/njs/njs_array.c Sun Apr 02 12:36:05 2017 +0300 +++ b/njs/njs_array.c Tue Apr 04 06:10:10 2017 +0300 @@ -58,6 +58,12 @@ typedef struct { typedef struct { njs_array_iter_t iter; + njs_value_t value; +} njs_array_find_t; + + +typedef struct { + njs_array_iter_t iter; njs_array_t *array; } njs_array_map_t; @@ -92,6 +98,8 @@ static njs_ret_t njs_array_prototype_eve njs_value_t *args, nxt_uint_t nargs, njs_index_t unused); static njs_ret_t njs_array_prototype_filter_continuation(njs_vm_t *vm, njs_value_t *args, nxt_uint_t nargs, njs_index_t unused); +static njs_ret_t njs_array_prototype_find_continuation(njs_vm_t *vm, + njs_value_t *args, nxt_uint_t nargs, njs_index_t unused); static njs_ret_t njs_array_prototype_map_continuation(njs_vm_t *vm, njs_value_t *args, nxt_uint_t nargs, njs_index_t unused); static nxt_noinline uint32_t njs_array_prototype_map_index(njs_array_t *array, @@ -102,6 +110,8 @@ static nxt_noinline uint32_t njs_array_i njs_array_iter_t *iter); static nxt_noinline njs_ret_t njs_array_iterator_apply(njs_vm_t *vm, njs_array_iter_t *iter, njs_value_t *args, nxt_uint_t nargs); +static nxt_noinline njs_ret_t njs_array_prototype_find_apply(njs_vm_t *vm, + njs_array_iter_t *iter, njs_value_t *args, nxt_uint_t nargs); static njs_ret_t njs_array_prototype_reduce_continuation(njs_vm_t *vm, njs_value_t *args, nxt_uint_t nargs, njs_index_t unused); static njs_ret_t njs_array_prototype_reduce_right_continuation(njs_vm_t *vm, @@ -1465,6 +1475,94 @@ njs_array_prototype_filter_continuation( static njs_ret_t +njs_array_prototype_find(njs_vm_t *vm, njs_value_t *args, nxt_uint_t nargs, + njs_index_t unused) +{ + nxt_int_t ret; + njs_array_find_t *find; + + ret = njs_array_iterator_args(vm, args, nargs); + if (nxt_slow_path(ret != NXT_OK)) { + return ret; + } + + find = njs_vm_continuation(vm); + find->iter.u.cont.function = njs_array_prototype_find_continuation; + find->iter.retval.data.truth = 0; + + return njs_array_prototype_find_continuation(vm, args, nargs, unused); +} + + +static njs_ret_t +njs_array_prototype_find_continuation(njs_vm_t *vm, njs_value_t *args, + nxt_uint_t nargs, njs_index_t unused) +{ + njs_array_t *array; + njs_array_iter_t *iter; + njs_array_find_t *find; + const njs_value_t *retval; + + retval = &njs_value_void; + + find = njs_vm_continuation(vm); + iter = &find->iter; + + if (!njs_is_true(&iter->retval)) { + array = args[0].data.u.array; + iter->index++; + + if (iter->index < iter->length && iter->index < array->length) { + /* GC: find->value */ + find->value = array->start[iter->index]; + + return njs_array_prototype_find_apply(vm, iter, args, nargs); + } + + } else { + if (njs_is_valid(&find->value)) { + retval = &find->value; + } + } + + vm->retval = *retval; + + return NXT_OK; +} + + +static nxt_noinline njs_ret_t +njs_array_prototype_find_apply(njs_vm_t *vm, njs_array_iter_t *iter, + njs_value_t *args, nxt_uint_t nargs) +{ + uint32_t n; + const njs_value_t *value; + njs_value_t arguments[4]; + + /* GC: array elt, array */ + + value = (nargs > 2) ? &args[2] : &njs_value_void; + arguments[0] = *value; + + n = iter->index; + value = &args[0].data.u.array->start[n]; + + if (!njs_is_valid(value)) { + value = &njs_value_void; + } + + arguments[1] = *value; + + njs_number_set(&arguments[2], n); + + arguments[3] = args[0]; + + return njs_function_apply(vm, args[1].data.u.function, arguments, 4, + (njs_index_t) &iter->retval); +} + + +static njs_ret_t njs_array_prototype_map(njs_vm_t *vm, njs_value_t *args, nxt_uint_t nargs, njs_index_t unused) { @@ -2041,6 +2139,14 @@ static const njs_object_prop_t njs_arra njs_continuation_size(njs_array_filter_t), 0), }, + /* ES6. */ + { + .type = NJS_METHOD, + .name = njs_string("find"), + .value = njs_native_function(njs_array_prototype_find, + njs_continuation_size(njs_array_find_t), 0), + }, + { .type = NJS_METHOD, .name = njs_string("map"), diff -r c46da90ca064 -r 52d53653ac52 njs/test/njs_unit_test.c --- a/njs/test/njs_unit_test.c Sun Apr 02 12:36:05 2017 +0300 +++ b/njs/test/njs_unit_test.c Tue Apr 04 06:10:10 2017 +0300 @@ -2884,6 +2884,49 @@ static njs_unit_test_t njs_test[] = nxt_string("1,11,21,31,41,51,61") }, { nxt_string("var a = [];" + "a.find(function(v, i, a) { return v > 1 })"), + nxt_string("undefined") }, + + { nxt_string("var a = [,NaN,0,-1];" + "a.find(function(v, i, a) { return v > 1 })"), + nxt_string("undefined") }, + + { nxt_string("var a = [,NaN,0,-1,2];" + "a.find(function(v, i, a) { return v > 1 })"), + nxt_string("2") }, + + { nxt_string("var a = [1,2,3,-1,5];" + "a.find(function(v, i, a) { return v > 1 })"), + nxt_string("2") }, + + { nxt_string("var a = [,1,,-1,5];" + "a.find(function(v, i, a) { return v > 1 })"), + nxt_string("5") }, + + { nxt_string("var a = [,1,,-1,5,6];" + "a.find(function(v, i, a) { return v > 1 })"), + nxt_string("5") }, + + { nxt_string("[].find(function(v) { return (v === undefined) })"), + nxt_string("undefined") }, + + { nxt_string("var a = [,3];" + "a.find(function(v) { return (v === 3 || v === undefined) })"), + nxt_string("undefined") }, + + { nxt_string("var a = [1,,3];" + "a.find(function(v) { return (v === 3 || v === undefined) })"), + nxt_string("undefined") }, + + { nxt_string("var a = [1,2,3,4,5,6];" + "a.find(function(v, i, a) { a.shift(); return v == 3 })"), + nxt_string("3") }, + + { nxt_string("var a = [1,2,3,4,5,6];" + "a.find(function(v, i, a) { a.shift(); return v == 4 })"), + nxt_string("undefined") }, + + { nxt_string("var a = [];" "a.map(function(v, i, a) { return v + 1 })"), nxt_string("") }, From igor at sysoev.ru Tue Apr 4 10:24:37 2017 From: igor at sysoev.ru (Igor Sysoev) Date: Tue, 04 Apr 2017 10:24:37 +0000 Subject: [njs] Array.prototype.findIndex() method. Message-ID: details: http://hg.nginx.org/njs/rev/26e0ebd97454 branches: changeset: 331:26e0ebd97454 user: Andrey Zelenkov date: Tue Apr 04 06:16:49 2017 +0300 description: Array.prototype.findIndex() method. diffstat: njs/njs_array.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++ njs/test/njs_unit_test.c | 44 ++++++++++++++++++++++++++++++++++++ 2 files changed, 102 insertions(+), 0 deletions(-) diffs (136 lines): diff -r 52d53653ac52 -r 26e0ebd97454 njs/njs_array.c --- a/njs/njs_array.c Tue Apr 04 06:10:10 2017 +0300 +++ b/njs/njs_array.c Tue Apr 04 06:16:49 2017 +0300 @@ -100,6 +100,8 @@ static njs_ret_t njs_array_prototype_fil njs_value_t *args, nxt_uint_t nargs, njs_index_t unused); static njs_ret_t njs_array_prototype_find_continuation(njs_vm_t *vm, njs_value_t *args, nxt_uint_t nargs, njs_index_t unused); +static njs_ret_t njs_array_prototype_find_index_continuation(njs_vm_t *vm, + njs_value_t *args, nxt_uint_t nargs, njs_index_t unused); static njs_ret_t njs_array_prototype_map_continuation(njs_vm_t *vm, njs_value_t *args, nxt_uint_t nargs, njs_index_t unused); static nxt_noinline uint32_t njs_array_prototype_map_index(njs_array_t *array, @@ -1531,6 +1533,54 @@ njs_array_prototype_find_continuation(nj } +static njs_ret_t +njs_array_prototype_find_index(njs_vm_t *vm, njs_value_t *args, + nxt_uint_t nargs, njs_index_t unused) +{ + nxt_int_t ret; + njs_array_iter_t *iter; + + ret = njs_array_iterator_args(vm, args, nargs); + if (nxt_slow_path(ret != NXT_OK)) { + return ret; + } + + iter = njs_vm_continuation(vm); + iter->u.cont.function = njs_array_prototype_find_index_continuation; + iter->retval.data.truth = 0; + + return njs_array_prototype_find_index_continuation(vm, args, nargs, unused); +} + + +static njs_ret_t +njs_array_prototype_find_index_continuation(njs_vm_t *vm, njs_value_t *args, + nxt_uint_t nargs, njs_index_t unused) +{ + double index; + njs_array_iter_t *iter; + + iter = njs_vm_continuation(vm); + index = iter->index; + + if (!njs_is_true(&iter->retval)) { + iter->index++; + + if (iter->index < iter->length + && iter->index < args[0].data.u.array->length) + { + return njs_array_prototype_find_apply(vm, iter, args, nargs); + } + + index = -1; + } + + njs_number_set(&vm->retval, index); + + return NXT_OK; +} + + static nxt_noinline njs_ret_t njs_array_prototype_find_apply(njs_vm_t *vm, njs_array_iter_t *iter, njs_value_t *args, nxt_uint_t nargs) @@ -2147,6 +2197,14 @@ static const njs_object_prop_t njs_arra njs_continuation_size(njs_array_find_t), 0), }, + /* ES6. */ + { + .type = NJS_METHOD, + .name = njs_string("findIndex"), + .value = njs_native_function(njs_array_prototype_find_index, + njs_continuation_size(njs_array_iter_t), 0), + }, + { .type = NJS_METHOD, .name = njs_string("map"), diff -r 52d53653ac52 -r 26e0ebd97454 njs/test/njs_unit_test.c --- a/njs/test/njs_unit_test.c Tue Apr 04 06:10:10 2017 +0300 +++ b/njs/test/njs_unit_test.c Tue Apr 04 06:16:49 2017 +0300 @@ -2927,6 +2927,50 @@ static njs_unit_test_t njs_test[] = nxt_string("undefined") }, { nxt_string("var a = [];" + "a.findIndex(function(v, i, a) { return v > 1 })"), + nxt_string("-1") }, + + { nxt_string("var a = [,NaN,0,-1];" + "a.findIndex(function(v, i, a) { return v > 1 })"), + nxt_string("-1") }, + + { nxt_string("var a = [,NaN,0,-1,2];" + "a.findIndex(function(v, i, a) { return v > 1 })"), + nxt_string("4") }, + + { nxt_string("var a = [1,2,3,-1,5];" + "a.findIndex(function(v, i, a) { return v > 1 })"), + nxt_string("1") }, + + { nxt_string("var a = [,1,,-1,5];" + "a.findIndex(function(v, i, a) { return v > 1 })"), + nxt_string("4") }, + + { nxt_string("var a = [,1,,-1,5,6];" + "a.findIndex(function(v, i, a) { return v > 1 })"), + nxt_string("4") }, + + { nxt_string("[].findIndex(function(v) { return (v === undefined) })"), + nxt_string("-1") }, + + { nxt_string("[,].findIndex(function(v) { return (v === undefined) })"), + nxt_string("0") }, + + { nxt_string("[1,2,,3].findIndex(function(el){return el === undefined})"), + nxt_string("2") }, + + { nxt_string("[,2,,3].findIndex(function(el){return el === undefined})"), + nxt_string("0") }, + + { nxt_string("var a = [1,2,3,4,5,6];" + "a.findIndex(function(v, i, a) { a.shift(); return v == 3 })"), + nxt_string("1") }, + + { nxt_string("var a = [1,2,3,4,5,6];" + "a.findIndex(function(v, i, a) { a.shift(); return v == 4 })"), + nxt_string("-1") }, + + { nxt_string("var a = [];" "a.map(function(v, i, a) { return v + 1 })"), nxt_string("") }, From igor at sysoev.ru Tue Apr 4 10:24:38 2017 From: igor at sysoev.ru (Igor Sysoev) Date: Tue, 04 Apr 2017 10:24:38 +0000 Subject: [njs] Function declaration should return "undefined". Message-ID: details: http://hg.nginx.org/njs/rev/ada17c8bdd5a branches: changeset: 332:ada17c8bdd5a user: Igor Sysoev date: Tue Apr 04 10:47:12 2017 +0300 description: Function declaration should return "undefined". diffstat: njs/njs_generator.c | 7 ++++--- njs/test/njs_unit_test.c | 6 ++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diffs (33 lines): diff -r 26e0ebd97454 -r ada17c8bdd5a njs/njs_generator.c --- a/njs/njs_generator.c Tue Apr 04 06:16:49 2017 +0300 +++ b/njs/njs_generator.c Tue Apr 04 10:47:12 2017 +0300 @@ -1261,9 +1261,10 @@ njs_generate_stop_statement(njs_vm_t *vm stop->code.retval = NJS_VMCODE_NO_RETVAL; index = NJS_INDEX_NONE; - - if (node->right != NULL) { - index = node->right->index; + node = node->right; + + if (node != NULL && node->token != NJS_TOKEN_FUNCTION) { + index = node->index; } if (index == NJS_INDEX_NONE) { diff -r 26e0ebd97454 -r ada17c8bdd5a njs/test/njs_unit_test.c --- a/njs/test/njs_unit_test.c Tue Apr 04 06:16:49 2017 +0300 +++ b/njs/test/njs_unit_test.c Tue Apr 04 10:47:12 2017 +0300 @@ -4199,6 +4199,12 @@ static njs_unit_test_t njs_test[] = { nxt_string("function () { } f()"), nxt_string("SyntaxError: Unexpected token \"(\" in 1") }, + { nxt_string("function f() { }"), + nxt_string("undefined") }, + + { nxt_string("var x; function f() { }"), + nxt_string("undefined") }, + { nxt_string("function f() { } f()"), nxt_string("undefined") }, From igor at sysoev.ru Tue Apr 4 10:24:40 2017 From: igor at sysoev.ru (Igor Sysoev) Date: Tue, 04 Apr 2017 10:24:40 +0000 Subject: [njs] Global variables may be accessed incorrectly by nested functions. Message-ID: details: http://hg.nginx.org/njs/rev/251aa4b128ea branches: changeset: 333:251aa4b128ea user: Igor Sysoev date: Tue Apr 04 10:47:02 2017 +0300 description: Global variables may be accessed incorrectly by nested functions. diffstat: njs/njs_variable.c | 6 +++++- njs/test/njs_unit_test.c | 4 ++++ 2 files changed, 9 insertions(+), 1 deletions(-) diffs (30 lines): diff -r ada17c8bdd5a -r 251aa4b128ea njs/njs_variable.c --- a/njs/njs_variable.c Tue Apr 04 10:47:12 2017 +0300 +++ b/njs/njs_variable.c Tue Apr 04 10:47:02 2017 +0300 @@ -322,7 +322,11 @@ njs_variable_get(njs_vm_t *vm, njs_parse goto not_found; } - n = (node->scope->nesting != vs.scope->nesting); + n = 0; + + if (vs.scope->type > NJS_SCOPE_GLOBAL) { + n = (node->scope->nesting != vs.scope->nesting); + } var = vs.variable; index = var->index; diff -r ada17c8bdd5a -r 251aa4b128ea njs/test/njs_unit_test.c --- a/njs/test/njs_unit_test.c Tue Apr 04 10:47:12 2017 +0300 +++ b/njs/test/njs_unit_test.c Tue Apr 04 10:47:02 2017 +0300 @@ -4319,6 +4319,10 @@ static njs_unit_test_t njs_test[] = "var y = f(); y()"), nxt_string("6") }, + { nxt_string("var x; var y = 4;" + "function f() { function h() { x = 3; return y; } }"), + nxt_string("undefined") }, + /* Recursive fibonacci. */ { nxt_string("function fibo(n) {" From igor at sysoev.ru Tue Apr 4 10:24:41 2017 From: igor at sysoev.ru (Igor Sysoev) Date: Tue, 04 Apr 2017 10:24:41 +0000 Subject: [njs] Adding CHANGES to a release archive. Message-ID: details: http://hg.nginx.org/njs/rev/9d211a93c491 branches: changeset: 334:9d211a93c491 user: Igor Sysoev date: Tue Apr 04 10:52:24 2017 +0300 description: Adding CHANGES to a release archive. diffstat: Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r 251aa4b128ea -r 9d211a93c491 Makefile --- a/Makefile Tue Apr 04 10:47:02 2017 +0300 +++ b/Makefile Tue Apr 04 10:52:24 2017 +0300 @@ -86,7 +86,7 @@ clean: dist: make clean mkdir njs-$(NJS_VER) - cp -rp configure Makefile LICENSE README $(NXT_LIB) njs nginx \ + cp -rp configure Makefile LICENSE README CHANGES $(NXT_LIB) njs nginx \ njs-$(NJS_VER) tar czf njs-$(NJS_VER).tar.gz njs-$(NJS_VER) rm -rf njs-$(NJS_VER) From igor at sysoev.ru Tue Apr 4 10:24:42 2017 From: igor at sysoev.ru (Igor Sysoev) Date: Tue, 04 Apr 2017 10:24:42 +0000 Subject: [njs] Moving common code to njs_array_iterator_args(). Message-ID: details: http://hg.nginx.org/njs/rev/a4e6f27ce598 branches: changeset: 335:a4e6f27ce598 user: Igor Sysoev date: Tue Apr 04 10:56:33 2017 +0300 description: Moving common code to njs_array_iterator_args(). diffstat: njs/njs_array.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diffs (43 lines): diff -r 9d211a93c491 -r a4e6f27ce598 njs/njs_array.c --- a/njs/njs_array.c Tue Apr 04 10:52:24 2017 +0300 +++ b/njs/njs_array.c Tue Apr 04 10:56:33 2017 +0300 @@ -1266,7 +1266,6 @@ njs_array_prototype_some(njs_vm_t *vm, n iter = njs_vm_continuation(vm); iter->u.cont.function = njs_array_prototype_some_continuation; - iter->retval.data.truth = 0; return njs_array_prototype_some_continuation(vm, args, nargs, unused); } @@ -1429,7 +1428,6 @@ njs_array_prototype_filter(njs_vm_t *vm, filter = njs_vm_continuation(vm); filter->iter.u.cont.function = njs_array_prototype_filter_continuation; - filter->iter.retval.data.truth = 0; filter->array = njs_array_alloc(vm, 0, NJS_ARRAY_SPARE); if (nxt_slow_path(filter->array == NULL)) { @@ -1490,7 +1488,6 @@ njs_array_prototype_find(njs_vm_t *vm, n find = njs_vm_continuation(vm); find->iter.u.cont.function = njs_array_prototype_find_continuation; - find->iter.retval.data.truth = 0; return njs_array_prototype_find_continuation(vm, args, nargs, unused); } @@ -1547,7 +1544,6 @@ njs_array_prototype_find_index(njs_vm_t iter = njs_vm_continuation(vm); iter->u.cont.function = njs_array_prototype_find_index_continuation; - iter->retval.data.truth = 0; return njs_array_prototype_find_index_continuation(vm, args, nargs, unused); } @@ -1770,6 +1766,7 @@ njs_array_iterator_args(njs_vm_t *vm, nj iter = njs_vm_continuation(vm); iter->length = args[0].data.u.array->length; + iter->retval.data.truth = 0; iter->index = NJS_ARRAY_INVALID_INDEX; return NXT_OK; From igor at sysoev.ru Tue Apr 4 10:24:43 2017 From: igor at sysoev.ru (Igor Sysoev) Date: Tue, 04 Apr 2017 10:24:43 +0000 Subject: [njs] Moving njs_array_prototype_fill() to appropriate place. Message-ID: details: http://hg.nginx.org/njs/rev/f62632793238 branches: changeset: 336:f62632793238 user: Igor Sysoev date: Tue Apr 04 11:00:49 2017 +0300 description: Moving njs_array_prototype_fill() to appropriate place. diffstat: njs/njs_array.c | 126 ++++++++++++++++++++++++++++---------------------------- 1 files changed, 63 insertions(+), 63 deletions(-) diffs (143 lines): diff -r a4e6f27ce598 -r f62632793238 njs/njs_array.c --- a/njs/njs_array.c Tue Apr 04 10:56:33 2017 +0300 +++ b/njs/njs_array.c Tue Apr 04 11:00:49 2017 +0300 @@ -1214,6 +1214,69 @@ done: static njs_ret_t +njs_array_prototype_fill(njs_vm_t *vm, njs_value_t *args, nxt_uint_t nargs, + njs_index_t unused) +{ + nxt_int_t i, start, end, length; + njs_array_t *array; + + vm->retval = args[0]; + + if (nargs < 2 || !njs_is_array(&args[0])) { + return NXT_OK; + } + + array = args[0].data.u.array; + length = array->length; + + if (length == 0) { + return NXT_OK; + } + + start = 0; + end = length; + + if (nargs > 2) { + start = args[2].data.u.number; + + if (start > length) { + start = length; + } + + if (start < 0) { + start += length; + + if (start < 0) { + start = 0; + } + } + + if (nargs > 3) { + end = args[3].data.u.number; + + if (end > length) { + end = length; + } + + if (end < 0) { + end += length; + + if (end < 0) { + end = 0; + } + } + } + } + + for (i = start; i < end; i++) { + array->start[i] = args[1]; + } + + return NXT_OK; +} + + +static njs_ret_t njs_array_prototype_for_each(njs_vm_t *vm, njs_value_t *args, nxt_uint_t nargs, njs_index_t unused) { @@ -1352,69 +1415,6 @@ njs_array_prototype_every_continuation(n static njs_ret_t -njs_array_prototype_fill(njs_vm_t *vm, njs_value_t *args, nxt_uint_t nargs, - njs_index_t unused) -{ - nxt_int_t i, start, end, length; - njs_array_t *array; - - vm->retval = args[0]; - - if (nargs < 2 || !njs_is_array(&args[0])) { - return NXT_OK; - } - - array = args[0].data.u.array; - length = array->length; - - if (length == 0) { - return NXT_OK; - } - - start = 0; - end = length; - - if (nargs > 2) { - start = args[2].data.u.number; - - if (start > length) { - start = length; - } - - if (start < 0) { - start += length; - - if (start < 0) { - start = 0; - } - } - - if (nargs > 3) { - end = args[3].data.u.number; - - if (end > length) { - end = length; - } - - if (end < 0) { - end += length; - - if (end < 0) { - end = 0; - } - } - } - } - - for (i = start; i < end; i++) { - array->start[i] = args[1]; - } - - return NXT_OK; -} - - -static njs_ret_t njs_array_prototype_filter(njs_vm_t *vm, njs_value_t *args, nxt_uint_t nargs, njs_index_t unused) { From igor at sysoev.ru Tue Apr 4 10:24:45 2017 From: igor at sysoev.ru (Igor Sysoev) Date: Tue, 04 Apr 2017 10:24:45 +0000 Subject: [njs] Style fixes and small miscellaneous changes. Message-ID: details: http://hg.nginx.org/njs/rev/7e6460db39ad branches: changeset: 337:7e6460db39ad user: Igor Sysoev date: Tue Apr 04 13:23:10 2017 +0300 description: Style fixes and small miscellaneous changes. diffstat: njs/njs_array.c | 2 +- njs/njs_function.c | 4 ++-- njs/njs_parser.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diffs (45 lines): diff -r f62632793238 -r 7e6460db39ad njs/njs_array.c --- a/njs/njs_array.c Tue Apr 04 11:00:49 2017 +0300 +++ b/njs/njs_array.c Tue Apr 04 13:23:10 2017 +0300 @@ -2044,7 +2044,7 @@ njs_array_prototype_sort_continuation(nj sort->current++; n = sort->current; - } while (sort->current < array->length); + } while (n < array->length); } vm->retval = args[0]; diff -r f62632793238 -r 7e6460db39ad njs/njs_function.c --- a/njs/njs_function.c Tue Apr 04 11:00:49 2017 +0300 +++ b/njs/njs_function.c Tue Apr 04 13:23:10 2017 +0300 @@ -162,7 +162,7 @@ njs_function_frame(njs_vm_t *vm, njs_fun nxt_bool_t ctor) { size_t size; - nxt_uint_t n, max_args, closures;; + nxt_uint_t n, max_args, closures; njs_value_t *value, *bound; njs_frame_t *frame; njs_native_frame_t *native_frame; @@ -594,7 +594,7 @@ njs_function_activate(njs_vm_t *vm, njs_ cont->retval = retval; cont->return_address = vm->current - + sizeof(njs_vmcode_function_call_t);; + + sizeof(njs_vmcode_function_call_t); vm->current = (u_char *) njs_continuation_nexus; return NJS_APPLIED; diff -r f62632793238 -r 7e6460db39ad njs/njs_parser.c --- a/njs/njs_parser.c Tue Apr 04 11:00:49 2017 +0300 +++ b/njs/njs_parser.c Tue Apr 04 13:23:10 2017 +0300 @@ -178,7 +178,7 @@ njs_parser_scope_begin(njs_vm_t *vm, njs if (type == NJS_SCOPE_FUNCTION) { scope->next_index[0] = type; scope->next_index[1] = NJS_SCOPE_CLOSURE + nesting - + sizeof(njs_value_t);; + + sizeof(njs_value_t); } else { if (type == NJS_SCOPE_GLOBAL) { From igor at sysoev.ru Tue Apr 4 10:24:46 2017 From: igor at sysoev.ru (Igor Sysoev) Date: Tue, 04 Apr 2017 10:24:46 +0000 Subject: [njs] Version 0.1.10. Message-ID: details: http://hg.nginx.org/njs/rev/b1456ef3e002 branches: changeset: 338:b1456ef3e002 user: Igor Sysoev date: Tue Apr 04 13:23:11 2017 +0300 description: Version 0.1.10. diffstat: CHANGES | 9 +++++++++ Makefile | 2 +- 2 files changed, 10 insertions(+), 1 deletions(-) diffs (26 lines): diff -r 7e6460db39ad -r b1456ef3e002 CHANGES --- a/CHANGES Tue Apr 04 13:23:10 2017 +0300 +++ b/CHANGES Tue Apr 04 13:23:11 2017 +0300 @@ -1,3 +1,12 @@ + +Changes with nJScript 0.1.10 04 Apr 2017 + + *) Feature: nested functions and function closures. + + *) Feature: Array.of(), Array.prototype.fill(), Array.prototype.find(), + Array.prototype.findIndex() methods. + + *) Bugfix: miscellaneous bugs and segmentation faults have been fixed. Changes with nJScript 0.1.9 01 Feb 2017 diff -r 7e6460db39ad -r b1456ef3e002 Makefile --- a/Makefile Tue Apr 04 13:23:10 2017 +0300 +++ b/Makefile Tue Apr 04 13:23:11 2017 +0300 @@ -1,5 +1,5 @@ -NJS_VER = 0.1.9 +NJS_VER = 0.1.10 NXT_LIB = nxt From igor at sysoev.ru Tue Apr 4 10:24:47 2017 From: igor at sysoev.ru (Igor Sysoev) Date: Tue, 04 Apr 2017 10:24:47 +0000 Subject: [njs] Added tag 0.1.10 for changeset b1456ef3e002 Message-ID: details: http://hg.nginx.org/njs/rev/5a5b70cbbde9 branches: changeset: 339:5a5b70cbbde9 user: Igor Sysoev date: Tue Apr 04 13:24:09 2017 +0300 description: Added tag 0.1.10 for changeset b1456ef3e002 diffstat: .hgtags | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (8 lines): diff -r b1456ef3e002 -r 5a5b70cbbde9 .hgtags --- a/.hgtags Tue Apr 04 13:23:11 2017 +0300 +++ b/.hgtags Tue Apr 04 13:24:09 2017 +0300 @@ -8,3 +8,4 @@ 44b524f7e313369cd062a387511ea6fdc427875f 15dc54100400f99c3ec044d8fb0175dd3d69adcb 0.1.7 a29f29d481125db6101ecdc23dc20187c143cdc9 0.1.8 5bd2833988222900f60ad9b330ebc44df3b30662 0.1.9 +b1456ef3e002376d9d146a8a02acf6a4a21748e9 0.1.10 From jeppojeps at gmail.com Tue Apr 4 15:02:42 2017 From: jeppojeps at gmail.com (Antonio Nappa) Date: Tue, 4 Apr 2017 17:02:42 +0200 Subject: Proxy Pass Message-ID: Hello, in another of my experiments I would like to redirect to a completely different website the request, I had a look at the proxy_pass directive and the corresponding module, and I see that a location handler is set, which means it will hook as the only content handler. My question is, could I do the same as proxy_pass dinamically and not at config time? For example in the rewrite phase as you would do with the ngx_http_internal_redirect. Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From mdounin at mdounin.ru Tue Apr 4 15:02:48 2017 From: mdounin at mdounin.ru (Maxim Dounin) Date: Tue, 04 Apr 2017 15:02:48 +0000 Subject: [nginx] nginx-1.11.13-RELEASE Message-ID: details: http://hg.nginx.org/nginx/rev/3d0e8655f897 branches: changeset: 6967:3d0e8655f897 user: Maxim Dounin date: Tue Apr 04 18:01:57 2017 +0300 description: nginx-1.11.13-RELEASE diffstat: docs/xml/nginx/changes.xml | 91 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 91 insertions(+), 0 deletions(-) diffs (101 lines): diff --git a/docs/xml/nginx/changes.xml b/docs/xml/nginx/changes.xml --- a/docs/xml/nginx/changes.xml +++ b/docs/xml/nginx/changes.xml @@ -5,6 +5,97 @@ + + + + +???????? http_429 ? ?????????? proxy_next_upstream, fastcgi_next_upstream, +scgi_next_upstream ? uwsgi_next_upstream.
+??????? Piotr Sikora. +
+ +the "http_429" parameter of the "proxy_next_upstream", "fastcgi_next_upstream", +"scgi_next_upstream", and "uwsgi_next_upstream" directives.
+Thanks to Piotr Sikora. +
+
+ + + +? ????????? ?????? ????????? ??????. + + +in memory allocation error handling. + + + + + +??? ????????????? ???????? sendfile ? timer_resolution ?? Linux +??????? ????? ????????. + + +requests might hang +when using the "sendfile" and "timer_resolution" directives on Linux. + + + + + +??? ????????????? ? ???????????? ???????? sendfile ? aio_write +??????? ????? ????????. + + +requests might hang +when using the "sendfile" and "aio_write" directives with subrequests. + + + + + +? ?????? ngx_http_v2_module.
+??????? Piotr Sikora. +
+ +in the ngx_http_v2_module.
+Thanks to Piotr Sikora. +
+
+ + + +??? ????????????? HTTP/2 ? ??????? ???????? ??? ????????? segmentation fault. + + +a segmentation fault might occur in a worker process when using HTTP/2. + + + + + +??????? ????? ???????? +??? ????????????? ? ???????????? ???????? limit_rate, sendfile_max_chunk, +limit_req ??? ?????? $r->sleep() ??????????? ?????. + + +requests might hang +when using the "limit_rate", "sendfile_max_chunk", "limit_req" directives, +or the $r->sleep() embedded perl method with subrequests. + + + + + +? ?????? ngx_http_slice_module. + + +in the ngx_http_slice_module. + + + +
+ + From mdounin at mdounin.ru Tue Apr 4 15:02:51 2017 From: mdounin at mdounin.ru (Maxim Dounin) Date: Tue, 04 Apr 2017 15:02:51 +0000 Subject: [nginx] release-1.11.13 tag Message-ID: details: http://hg.nginx.org/nginx/rev/29ba1d6a2da9 branches: changeset: 6968:29ba1d6a2da9 user: Maxim Dounin date: Tue Apr 04 18:01:57 2017 +0300 description: release-1.11.13 tag diffstat: .hgtags | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (8 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -411,3 +411,4 @@ 20a45c768e5ed26b740679d0e22045c98727c3cc 1ad0999a7ded3d4fb01c7acf8ff57c80b643da7e release-1.11.10 d8b321a876d6254e9e98795e3b194ef053290354 release-1.11.11 7f394e433f0003222aa6531931ecc0b24740d5e4 release-1.11.12 +3d0e8655f897959e48cc74e87670bb5492a58871 release-1.11.13 From al-nginx at none.at Tue Apr 4 21:40:54 2017 From: al-nginx at none.at (Aleksandar Lazic) Date: Tue, 04 Apr 2017 23:40:54 +0200 Subject: Proxy Pass In-Reply-To: References: Message-ID: <0bc7b8a7c15b58916085c38e96c1c0a6@none.at> Hi. Am 04-04-2017 17:02, schrieb Antonio Nappa: > Hello, in another of my experiments I would like to redirect to a > completely different website the request, I had a look at the > proxy_pass directive and the corresponding module, and I see that > a location handler is set, which means it will hook as the only > content handler. > My question is, could I do the same as proxy_pass dinamically and > not at config time? For example in the rewrite phase as you would > do with the ngx_http_internal_redirect. Could proxy_redirect http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_redirect be a solution? Regards Aleks > Thanks > > _______________________________________________ > nginx-devel mailing list > nginx-devel at nginx.org > http://mailman.nginx.org/mailman/listinfo/nginx-devel From Elliot.Thomas at bbc.co.uk Wed Apr 5 12:12:06 2017 From: Elliot.Thomas at bbc.co.uk (Elliot Thomas) Date: Wed, 5 Apr 2017 12:12:06 +0000 Subject: [PATCH] SSL: Added crl_check_mode Message-ID: Hello, We have our own independent CA hierarchy, complete with client certificates for servers and staff. When a server (or staff member) is repurposed or decommissioned, we need to be able to revoke their certificate - we do this by maintaining sets of CRLs. Unfortunately, due to flaws in this hierarchy, getting a complete CRL chain for each CA we have is difficult. This means client certs we would consider valid are rejected as Nginx sets 'X509_V_FLAG_CRL_CHECK_ALL' on the X509 store when the 'ssl_crl' directive is used. In the Apache world we get around this by using the 'SSLCARevocationCheck leaf' option. It would be nice to be able to control this flag, if only to work around broken CRL chains. I've noticed a variant of this problem has been discussed before (see trac issue #1094 and "[PATCH] SSL: Added crl_check_mode", March 2017) and a patch submitted. Before I knew of this, I wrote my own, roughly equivalent patch (see attached). I haven't explicitly tested the stream or mail changes, but the test suite does pass with these modules+ssl enabled. Is there any possibility of having one of these patches incorporated? Thanks, Elliot. ----------------------------- http://www.bbc.co.uk This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated. If you have received it in error, please delete it from your system. Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately. Please note that the BBC monitors e-mails sent or received. Further communication will signify your consent to this. ----------------------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: changeset.txt URL: From piotrsikora at google.com Wed Apr 5 12:32:50 2017 From: piotrsikora at google.com (Piotr Sikora) Date: Wed, 5 Apr 2017 05:32:50 -0700 Subject: [PATCH] HTTP/2: add fast-path for HTTP/2 requests without request body In-Reply-To: <630a8209defe25add709.1490839177@piotrsikora.sfo.corp.google.com> References: <1959760.0ShWjv0uEp@vbart-workstation> <630a8209defe25add709.1490839177@piotrsikora.sfo.corp.google.com> Message-ID: Hey Valentin, > # HG changeset patch > # User Piotr Sikora > # Date 1490516712 25200 > # Sun Mar 26 01:25:12 2017 -0700 > # Node ID 630a8209defe25add7094dfc7b9bc9bcabe0933d > # Parent 22be63bf21edaa1b8ea916c7d8cd4e5fe4892061 > HTTP/2: add fast-path for HTTP/2 requests without request body. > > Signed-off-by: Piotr Sikora > > diff -r 22be63bf21ed -r 630a8209defe src/http/v2/ngx_http_v2.c > --- a/src/http/v2/ngx_http_v2.c > +++ b/src/http/v2/ngx_http_v2.c > @@ -3520,6 +3520,12 @@ ngx_http_v2_read_request_body(ngx_http_r > > r->request_body = rb; > > + if (stream->in_closed && stream->preread == NULL) { > + r->request_body_no_buffering = 0; > + post_handler(r); > + return NGX_OK; > + } > + > h2scf = ngx_http_get_module_srv_conf(r, ngx_http_v2_module); > clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); > Any thoughts on the updated patch? Thanks! Best regards, Piotr Sikora From piotrsikora at google.com Wed Apr 5 12:33:45 2017 From: piotrsikora at google.com (Piotr Sikora) Date: Wed, 5 Apr 2017 05:33:45 -0700 Subject: [PATCH 1 of 3] HTTP: add support for trailers in HTTP responses In-Reply-To: <8af81a0d66c0f69bcf50.1491211931@piotrsikora.sfo.corp.google.com> References: <8af81a0d66c0f69bcf50.1491211931@piotrsikora.sfo.corp.google.com> Message-ID: Hey, > # HG changeset patch > # User Piotr Sikora > # Date 1490351854 25200 > # Fri Mar 24 03:37:34 2017 -0700 > # Node ID 8af81a0d66c0f69bcf501edcf10deed4c8f7fbd4 > # Parent 39ff6939266e913e8bfd400e60f9520e70725a4d > HTTP: add support for trailers in HTTP responses. > > Example: > > ngx_table_elt_t *h; > > h = ngx_list_push(&r->headers_out.trailers); > if (h == NULL) { > return NGX_ERROR; > } > > ngx_str_set(&h->key, "Fun"); > ngx_str_set(&h->value, "with trailers"); > h->hash = ngx_hash_key_lc(h->key.data, h->key.len); > > The code above adds "Fun: with trailers" trailer to the response to > the request with "TE: trailers" header (which indicates support for > trailers). > > Modules that want to emit trailers must set r->expect_trailers = 1, > otherwise they are going to be ignored. > > This change also adds $sent_trailer_* variables. > > Signed-off-by: Piotr Sikora Ping. Best regards, Piotr Sikora From eustas.ru at gmail.com Wed Apr 5 13:10:56 2017 From: eustas.ru at gmail.com (Eugene Kluchnikov) Date: Wed, 5 Apr 2017 15:10:56 +0200 Subject: [PATCH] Extend gzip_static module to serve brotli content Message-ID: # HG changeset patch # User Evgenii Kliuchnikov # Date 1491397672 -7200 # Wed Apr 05 15:07:52 2017 +0200 # Node ID 2110fbba14fa090de04de72eeb995ef9ccca4c61 # Parent 29ba1d6a2da9320e68ef2b7a2516c4c424672ea8 Extend gzip_static module to serve "br" encoding. Refactored encoding and quality parsing utilities to get encoding as a parameter. HG Enter commit message. Lines beginning with 'HG:' are removed. diff -r 29ba1d6a2da9 -r 2110fbba14fa contrib/vim/syntax/nginx.vim --- a/contrib/vim/syntax/nginx.vim Tue Apr 04 18:01:57 2017 +0300 +++ b/contrib/vim/syntax/nginx.vim Wed Apr 05 15:07:52 2017 +0200 @@ -111,6 +111,7 @@ syn keyword ngxDirective autoindex_exact_size syn keyword ngxDirective autoindex_format syn keyword ngxDirective autoindex_localtime +syn keyword ngxDirective brotli_static syn keyword ngxDirective charset syn keyword ngxDirective charset_map syn keyword ngxDirective charset_types diff -r 29ba1d6a2da9 -r 2110fbba14fa src/http/modules/ngx_http_gzip_static_module.c --- a/src/http/modules/ngx_http_gzip_static_module.c Tue Apr 04 18:01:57 2017 +0300 +++ b/src/http/modules/ngx_http_gzip_static_module.c Wed Apr 05 15:07:52 2017 +0200 @@ -16,10 +16,14 @@ typedef struct { - ngx_uint_t enable; + ngx_uint_t enable_gzip; + ngx_uint_t enable_brotli; } ngx_http_gzip_static_conf_t; +static ngx_int_t ngx_http_gzip_static_serve_file(ngx_http_request_t *r, + ngx_uint_t enable, ngx_uint_t ok, ngx_http_core_loc_conf_t *clcf, + ngx_str_t *encoding); static ngx_int_t ngx_http_gzip_static_handler(ngx_http_request_t *r); static void *ngx_http_gzip_static_create_conf(ngx_conf_t *cf); static char *ngx_http_gzip_static_merge_conf(ngx_conf_t *cf, void *parent, @@ -41,7 +45,14 @@ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1, ngx_conf_set_enum_slot, NGX_HTTP_LOC_CONF_OFFSET, - offsetof(ngx_http_gzip_static_conf_t, enable), + offsetof(ngx_http_gzip_static_conf_t, enable_gzip), + &ngx_http_gzip_static }, + + { ngx_string("brotli_static"), + NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1, + ngx_conf_set_enum_slot, + NGX_HTTP_LOC_CONF_OFFSET, + offsetof(ngx_http_gzip_static_conf_t, enable_brotli), &ngx_http_gzip_static }, ngx_null_command @@ -79,19 +90,14 @@ }; +static ngx_str_t encoding_gzip = ngx_string("gzip"); +static ngx_str_t encoding_brotli = ngx_string("br"); + + static ngx_int_t ngx_http_gzip_static_handler(ngx_http_request_t *r) { - u_char *p; - size_t root; - ngx_str_t path; ngx_int_t rc; - ngx_uint_t level; - ngx_log_t *log; - ngx_buf_t *b; - ngx_chain_t out; - ngx_table_elt_t *h; - ngx_open_file_info_t of; ngx_http_core_loc_conf_t *clcf; ngx_http_gzip_static_conf_t *gzcf; @@ -105,19 +111,58 @@ gzcf = ngx_http_get_module_loc_conf(r, ngx_http_gzip_static_module); - if (gzcf->enable == NGX_HTTP_GZIP_STATIC_OFF) { + if (gzcf->enable_gzip == NGX_HTTP_GZIP_STATIC_OFF + && gzcf->enable_brotli == NGX_HTTP_GZIP_STATIC_OFF) { return NGX_DECLINED; } - if (gzcf->enable == NGX_HTTP_GZIP_STATIC_ON) { - rc = ngx_http_gzip_ok(r); + clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); + + rc = NGX_DECLINED; + if (gzcf->enable_gzip != NGX_HTTP_GZIP_STATIC_OFF) { + if (gzcf->enable_gzip == NGX_HTTP_GZIP_STATIC_ON) { + rc = ngx_http_gzip_ok(r); - } else { - /* always */ - rc = NGX_OK; + } else { + /* always */ + rc = NGX_OK; + } + rc = ngx_http_gzip_static_serve_file(r, gzcf->enable_gzip, rc, clcf, + &encoding_gzip); } - clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); + if (gzcf->enable_brotli != NGX_HTTP_GZIP_STATIC_OFF && rc == NGX_DECLINED) { + if (gzcf->enable_brotli == NGX_HTTP_GZIP_STATIC_ON) { + rc = ngx_http_brotli_ok(r); + } else { + + /* always */ + rc = NGX_OK; + } + rc = ngx_http_gzip_static_serve_file(r, gzcf->enable_brotli, rc, clcf, + &encoding_brotli); + } + + return rc; +} + + +static ngx_int_t +ngx_http_gzip_static_serve_file(ngx_http_request_t *r, ngx_uint_t enable, + ngx_uint_t ok, ngx_http_core_loc_conf_t *clcf, ngx_str_t *encoding) +{ + u_char *p; + size_t root; + ngx_str_t path; + ngx_int_t rc; + ngx_uint_t level; + ngx_log_t *log; + ngx_buf_t *b; + ngx_chain_t out; + ngx_table_elt_t *h; + ngx_open_file_info_t of; + + rc = ok; if (!clcf->gzip_vary && rc != NGX_OK) { return NGX_DECLINED; @@ -125,14 +170,14 @@ log = r->connection->log; - p = ngx_http_map_uri_to_path(r, &path, &root, sizeof(".gz") - 1); + p = ngx_http_map_uri_to_path(r, &path, &root, 4 - 1); if (p == NULL) { return NGX_HTTP_INTERNAL_SERVER_ERROR; } *p++ = '.'; - *p++ = 'g'; - *p++ = 'z'; + *p++ = encoding->data[0]; + *p++ = encoding->data[1]; *p = '\0'; path.len = p - path.data; @@ -188,7 +233,7 @@ return NGX_DECLINED; } - if (gzcf->enable == NGX_HTTP_GZIP_STATIC_ON) { + if (enable == NGX_HTTP_GZIP_STATIC_ON) { r->gzip_vary = 1; if (rc != NGX_OK) { @@ -243,7 +288,7 @@ h->hash = 1; ngx_str_set(&h->key, "Content-Encoding"); - ngx_str_set(&h->value, "gzip"); + h->value = *encoding; r->headers_out.content_encoding = h; /* we need to allocate all before the header would be sent */ @@ -293,7 +338,8 @@ return NULL; } - conf->enable = NGX_CONF_UNSET_UINT; + conf->enable_gzip = NGX_CONF_UNSET_UINT; + conf->enable_brotli = NGX_CONF_UNSET_UINT; return conf; } @@ -305,7 +351,9 @@ ngx_http_gzip_static_conf_t *prev = parent; ngx_http_gzip_static_conf_t *conf = child; - ngx_conf_merge_uint_value(conf->enable, prev->enable, + ngx_conf_merge_uint_value(conf->enable_gzip, prev->enable_gzip, + NGX_HTTP_GZIP_STATIC_OFF); + ngx_conf_merge_uint_value(conf->enable_brotli, prev->enable_brotli, NGX_HTTP_GZIP_STATIC_OFF); return NGX_CONF_OK; diff -r 29ba1d6a2da9 -r 2110fbba14fa src/http/ngx_http_core_module.c --- a/src/http/ngx_http_core_module.c Tue Apr 04 18:01:57 2017 +0300 +++ b/src/http/ngx_http_core_module.c Wed Apr 05 15:07:52 2017 +0200 @@ -74,8 +74,8 @@ static char *ngx_http_core_resolver(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); #if (NGX_HTTP_GZIP) -static ngx_int_t ngx_http_gzip_accept_encoding(ngx_str_t *ae); -static ngx_uint_t ngx_http_gzip_quantity(u_char *p, u_char *last); +static ngx_int_t ngx_http_accept_encoding(ngx_str_t *ae, char *e, size_t n); +static ngx_uint_t ngx_http_encoding_quantity(u_char *p, u_char *last); static char *ngx_http_gzip_disable(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); #endif @@ -2175,7 +2175,7 @@ */ if (ngx_memcmp(ae->value.data, "gzip,", 5) != 0 - && ngx_http_gzip_accept_encoding(&ae->value) != NGX_OK) + && ngx_http_accept_encoding(&ae->value, "gzip", 4) != NGX_OK) { return NGX_DECLINED; } @@ -2302,15 +2302,42 @@ } +ngx_int_t +ngx_http_brotli_ok(ngx_http_request_t *r) +{ + ngx_table_elt_t *ae; + + if (r != r->main) { + return NGX_DECLINED; + } + + ae = r->headers_in.accept_encoding; + if (ae == NULL) { + return NGX_DECLINED; + } + + if (ae->value.len < sizeof("br") - 1) { + return NGX_DECLINED; + } + + if (ngx_http_accept_encoding(&ae->value, "br", 2) != NGX_OK) + { + return NGX_DECLINED; + } + + return NGX_OK; +} + + /* - * gzip is enabled for the following quantities: + * encoding is enabled for the following quantities: * "gzip; q=0.001" ... "gzip; q=1.000" - * gzip is disabled for the following quantities: - * "gzip; q=0" ... "gzip; q=0.000", and for any invalid cases + * encoding is disabled for the following quantities: + * "br; q=0" ... "br; q=0.000", and for any invalid cases */ static ngx_int_t -ngx_http_gzip_accept_encoding(ngx_str_t *ae) +ngx_http_accept_encoding(ngx_str_t *ae, char *e, size_t n) { u_char *p, *start, *last; @@ -2318,7 +2345,7 @@ last = start + ae->len; for ( ;; ) { - p = ngx_strcasestrn(start, "gzip", 4 - 1); + p = ngx_strcasestrn(start, e, n - 1); if (p == NULL) { return NGX_DECLINED; } @@ -2327,10 +2354,10 @@ break; } - start = p + 4; - } - - p += 4; + start = p + n; + } + + p += n; while (p < last) { switch (*p++) { @@ -2369,7 +2396,7 @@ return NGX_DECLINED; } - if (ngx_http_gzip_quantity(p, last) == 0) { + if (ngx_http_encoding_quantity(p, last) == 0) { return NGX_DECLINED; } @@ -2378,7 +2405,7 @@ static ngx_uint_t -ngx_http_gzip_quantity(u_char *p, u_char *last) +ngx_http_encoding_quantity(u_char *p, u_char *last) { u_char c; ngx_uint_t n, q; diff -r 29ba1d6a2da9 -r 2110fbba14fa src/http/ngx_http_core_module.h --- a/src/http/ngx_http_core_module.h Tue Apr 04 18:01:57 2017 +0300 +++ b/src/http/ngx_http_core_module.h Wed Apr 05 15:07:52 2017 +0200 @@ -504,6 +504,7 @@ ngx_int_t ngx_http_auth_basic_user(ngx_http_request_t *r); #if (NGX_HTTP_GZIP) ngx_int_t ngx_http_gzip_ok(ngx_http_request_t *r); +ngx_int_t ngx_http_brotli_ok(ngx_http_request_t *r); #endif -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: add-brotli.patch Type: application/octet-stream Size: 9890 bytes Desc: not available URL: From vbart at nginx.com Wed Apr 5 15:13:52 2017 From: vbart at nginx.com (Valentin V. Bartenev) Date: Wed, 05 Apr 2017 18:13:52 +0300 Subject: [PATCH] HTTP/2: add fast-path for HTTP/2 requests without request body In-Reply-To: References: <1959760.0ShWjv0uEp@vbart-workstation> <630a8209defe25add709.1490839177@piotrsikora.sfo.corp.google.com> Message-ID: <3274060.dBGtzE6Y78@vbart-workstation> On Wednesday 05 April 2017 05:32:50 Piotr Sikora via nginx-devel wrote: > Hey Valentin, > > > # HG changeset patch > > # User Piotr Sikora > > # Date 1490516712 25200 > > # Sun Mar 26 01:25:12 2017 -0700 > > # Node ID 630a8209defe25add7094dfc7b9bc9bcabe0933d > > # Parent 22be63bf21edaa1b8ea916c7d8cd4e5fe4892061 > > HTTP/2: add fast-path for HTTP/2 requests without request body. > > > > Signed-off-by: Piotr Sikora > > > > diff -r 22be63bf21ed -r 630a8209defe src/http/v2/ngx_http_v2.c > > --- a/src/http/v2/ngx_http_v2.c > > +++ b/src/http/v2/ngx_http_v2.c > > @@ -3520,6 +3520,12 @@ ngx_http_v2_read_request_body(ngx_http_r > > > > r->request_body = rb; > > > > + if (stream->in_closed && stream->preread == NULL) { > > + r->request_body_no_buffering = 0; > > + post_handler(r); > > + return NGX_OK; > > + } > > + > > h2scf = ngx_http_get_module_srv_conf(r, ngx_http_v2_module); > > clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); > > > > Any thoughts on the updated patch? Thanks! > [..] With your patch the behavior is different in these cases: GET / HTTP/1.1 Host: example.com Transfer-Encoding: chunked 0 and HEADERS DATA length:0 END_STREAM Moreover, it depends on the time when DATA frame is processed: before ngx_http_read_request_body() call or after. wbr, Valentin V. Bartenev From mdounin at mdounin.ru Wed Apr 5 15:25:49 2017 From: mdounin at mdounin.ru (Maxim Dounin) Date: Wed, 5 Apr 2017 18:25:49 +0300 Subject: [PATCH 1 of 3] HTTP: add support for trailers in HTTP responses In-Reply-To: References: <8af81a0d66c0f69bcf50.1491211931@piotrsikora.sfo.corp.google.com> Message-ID: <20170405152549.GQ13617@mdounin.ru> Hello! On Wed, Apr 05, 2017 at 05:33:45AM -0700, Piotr Sikora via nginx-devel wrote: > Hey, > > > # HG changeset patch > > # User Piotr Sikora > > # Date 1490351854 25200 > > # Fri Mar 24 03:37:34 2017 -0700 > > # Node ID 8af81a0d66c0f69bcf501edcf10deed4c8f7fbd4 > > # Parent 39ff6939266e913e8bfd400e60f9520e70725a4d > > HTTP: add support for trailers in HTTP responses. > > > > Example: > > > > ngx_table_elt_t *h; > > > > h = ngx_list_push(&r->headers_out.trailers); > > if (h == NULL) { > > return NGX_ERROR; > > } > > > > ngx_str_set(&h->key, "Fun"); > > ngx_str_set(&h->value, "with trailers"); > > h->hash = ngx_hash_key_lc(h->key.data, h->key.len); > > > > The code above adds "Fun: with trailers" trailer to the response to > > the request with "TE: trailers" header (which indicates support for > > trailers). > > > > Modules that want to emit trailers must set r->expect_trailers = 1, > > otherwise they are going to be ignored. > > > > This change also adds $sent_trailer_* variables. > > > > Signed-off-by: Piotr Sikora > > Ping. I don't currently have time to look into it, sorry. I'll look once time permits. Meanwhile, you may improve things by providing links to previous versions of the patch and describing changes made since then. -- Maxim Dounin http://nginx.org/ From mdounin at mdounin.ru Wed Apr 5 15:31:07 2017 From: mdounin at mdounin.ru (Maxim Dounin) Date: Wed, 5 Apr 2017 18:31:07 +0300 Subject: [PATCH] SSL: Added crl_check_mode In-Reply-To: References: Message-ID: <20170405153107.GR13617@mdounin.ru> Hello! On Wed, Apr 05, 2017 at 12:12:06PM +0000, Elliot Thomas wrote: > Hello, > > We have our own independent CA hierarchy, complete with client > certificates for servers and staff. When a server (or staff member) is > repurposed or decommissioned, we need to be able to revoke their > certificate - we do this by maintaining sets of CRLs. > > Unfortunately, due to flaws in this hierarchy, getting a complete CRL > chain for each CA we have is difficult. This means client certs we would > consider valid are rejected as Nginx sets 'X509_V_FLAG_CRL_CHECK_ALL' on > the X509 store when the 'ssl_crl' directive is used. In the Apache world > we get around this by using the 'SSLCARevocationCheck leaf' option. > > It would be nice to be able to control this flag, if only to work around > broken CRL chains. > > I've noticed a variant of this problem has been discussed before (see trac > issue #1094 and "[PATCH] SSL: Added crl_check_mode", March 2017) and a > patch submitted. Before I knew of this, I wrote my own, roughly equivalent > patch (see attached). I haven't explicitly tested the stream or mail > changes, but the test suite does pass with these modules+ssl enabled. > > Is there any possibility of having one of these patches incorporated? Unlikely. You may have better luck cleaning up your CA hierarchy. -- Maxim Dounin http://nginx.org/ From vbart at nginx.com Wed Apr 5 15:55:08 2017 From: vbart at nginx.com (Valentin V. Bartenev) Date: Wed, 05 Apr 2017 18:55:08 +0300 Subject: [PATCH] HTTP/2: add fast-path for HTTP/2 requests without request body In-Reply-To: <3274060.dBGtzE6Y78@vbart-workstation> References: <1959760.0ShWjv0uEp@vbart-workstation> <3274060.dBGtzE6Y78@vbart-workstation> Message-ID: <1628062.LQhmvgvNLU@vbart-workstation> On Wednesday 05 April 2017 18:13:52 Valentin V. Bartenev wrote: > On Wednesday 05 April 2017 05:32:50 Piotr Sikora via nginx-devel wrote: > > Hey Valentin, > > > > > # HG changeset patch > > > # User Piotr Sikora > > > # Date 1490516712 25200 > > > # Sun Mar 26 01:25:12 2017 -0700 > > > # Node ID 630a8209defe25add7094dfc7b9bc9bcabe0933d > > > # Parent 22be63bf21edaa1b8ea916c7d8cd4e5fe4892061 > > > HTTP/2: add fast-path for HTTP/2 requests without request body. > > > > > > Signed-off-by: Piotr Sikora > > > > > > diff -r 22be63bf21ed -r 630a8209defe src/http/v2/ngx_http_v2.c > > > --- a/src/http/v2/ngx_http_v2.c > > > +++ b/src/http/v2/ngx_http_v2.c > > > @@ -3520,6 +3520,12 @@ ngx_http_v2_read_request_body(ngx_http_r > > > > > > r->request_body = rb; > > > > > > + if (stream->in_closed && stream->preread == NULL) { > > > + r->request_body_no_buffering = 0; > > > + post_handler(r); > > > + return NGX_OK; > > > + } > > > + > > > h2scf = ngx_http_get_module_srv_conf(r, ngx_http_v2_module); > > > clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); > > > > > > > Any thoughts on the updated patch? Thanks! > > > [..] > > With your patch the behavior is different in these cases: > > GET / HTTP/1.1 > Host: example.com > Transfer-Encoding: chunked > > 0 > > and > > HEADERS > DATA length:0 END_STREAM > > Moreover, it depends on the time when DATA frame is processed: > before ngx_http_read_request_body() call or after. > In fact, to eliminate the difference the check must be identical: # HG changeset patch # User Valentin Bartenev # Date 1491405913 -10800 # Wed Apr 05 18:25:13 2017 +0300 # Node ID daf8ee97e898b679b00759c9ff1081de4c3515a3 # Parent 28dc369899ea77b03fab44d8878b273d28f06437 HTTP/2: fast-path for requests without body. This eliminates difference in behavior between HTTP/1.x and HTTP/2 code paths. diff -r 28dc369899ea -r daf8ee97e898 src/http/v2/ngx_http_v2.c --- a/src/http/v2/ngx_http_v2.c Sun Mar 26 01:25:01 2017 -0700 +++ b/src/http/v2/ngx_http_v2.c Wed Apr 05 18:25:13 2017 +0300 @@ -3525,6 +3525,12 @@ ngx_http_v2_read_request_body(ngx_http_r r->request_body = rb; + if (r->headers_in.content_length_n < 0 && !r->headers_in.chunked) { + r->request_body_no_buffering = 0; + post_handler(r); + return NGX_OK; + } + h2scf = ngx_http_get_module_srv_conf(r, ngx_http_v2_module); clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); or another way: # HG changeset patch # User Valentin Bartenev # Date 1491407679 -10800 # Wed Apr 05 18:54:39 2017 +0300 # Node ID 3398c1d446dddc4d1677370f9c8189e6aa4ff4e8 # Parent 29ba1d6a2da9320e68ef2b7a2516c4c424672ea8 HTTP/2: reduced difference to HTTP/1.x in reading request body. This also eliminates difference in behavior for requests without body. diff -r 29ba1d6a2da9 -r 3398c1d446dd src/http/ngx_http_request_body.c --- a/src/http/ngx_http_request_body.c Tue Apr 04 18:01:57 2017 +0300 +++ b/src/http/ngx_http_request_body.c Wed Apr 05 18:54:39 2017 +0300 @@ -46,13 +46,6 @@ ngx_http_read_client_request_body(ngx_ht return NGX_OK; } -#if (NGX_HTTP_V2) - if (r->stream) { - rc = ngx_http_v2_read_request_body(r, post_handler); - goto done; - } -#endif - if (ngx_http_test_expect(r) != NGX_OK) { rc = NGX_HTTP_INTERNAL_SERVER_ERROR; goto done; @@ -85,6 +78,13 @@ ngx_http_read_client_request_body(ngx_ht return NGX_OK; } +#if (NGX_HTTP_V2) + if (r->stream) { + rc = ngx_http_v2_read_request_body(r); + goto done; + } +#endif + preread = r->header_in->last - r->header_in->pos; if (preread) { @@ -805,7 +805,8 @@ ngx_http_test_expect(ngx_http_request_t if (r->expect_tested || r->headers_in.expect == NULL - || r->http_version < NGX_HTTP_VERSION_11) + || r->http_version < NGX_HTTP_VERSION_11 + || r->http_version == NGX_HTTP_VERSION_20) { return NGX_OK; } diff -r 29ba1d6a2da9 -r 3398c1d446dd src/http/v2/ngx_http_v2.c --- a/src/http/v2/ngx_http_v2.c Tue Apr 04 18:01:57 2017 +0300 +++ b/src/http/v2/ngx_http_v2.c Wed Apr 05 18:54:39 2017 +0300 @@ -3484,8 +3484,7 @@ ngx_http_v2_run_request(ngx_http_request ngx_int_t -ngx_http_v2_read_request_body(ngx_http_request_t *r, - ngx_http_client_body_handler_pt post_handler) +ngx_http_v2_read_request_body(ngx_http_request_t *r) { off_t len; size_t size; @@ -3498,32 +3497,7 @@ ngx_http_v2_read_request_body(ngx_http_r ngx_http_v2_connection_t *h2c; stream = r->stream; - - if (stream->skip_data) { - r->request_body_no_buffering = 0; - post_handler(r); - return NGX_OK; - } - - rb = ngx_pcalloc(r->pool, sizeof(ngx_http_request_body_t)); - if (rb == NULL) { - return NGX_HTTP_INTERNAL_SERVER_ERROR; - } - - /* - * set by ngx_pcalloc(): - * - * rb->bufs = NULL; - * rb->buf = NULL; - * rb->received = 0; - * rb->free = NULL; - * rb->busy = NULL; - */ - - rb->rest = 1; - rb->post_handler = post_handler; - - r->request_body = rb; + rb = r->request_body; h2scf = ngx_http_get_module_srv_conf(r, ngx_http_v2_module); clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); @@ -3574,6 +3548,8 @@ ngx_http_v2_read_request_body(ngx_http_r return NGX_HTTP_INTERNAL_SERVER_ERROR; } + rb->rest = 1; + buf = stream->preread; if (stream->in_closed) { diff -r 29ba1d6a2da9 -r 3398c1d446dd src/http/v2/ngx_http_v2.h --- a/src/http/v2/ngx_http_v2.h Tue Apr 04 18:01:57 2017 +0300 +++ b/src/http/v2/ngx_http_v2.h Wed Apr 05 18:54:39 2017 +0300 @@ -264,8 +264,7 @@ ngx_http_v2_queue_blocked_frame(ngx_http void ngx_http_v2_init(ngx_event_t *rev); void ngx_http_v2_request_headers_init(void); -ngx_int_t ngx_http_v2_read_request_body(ngx_http_request_t *r, - ngx_http_client_body_handler_pt post_handler); +ngx_int_t ngx_http_v2_read_request_body(ngx_http_request_t *r); ngx_int_t ngx_http_v2_read_unbuffered_request_body(ngx_http_request_t *r); void ngx_http_v2_close_stream(ngx_http_v2_stream_t *stream, ngx_int_t rc); From vbart at nginx.com Wed Apr 5 18:17:28 2017 From: vbart at nginx.com (Valentin V. Bartenev) Date: Wed, 05 Apr 2017 21:17:28 +0300 Subject: [PATCH] HTTP/2: add fast-path for HTTP/2 requests without request body In-Reply-To: <1628062.LQhmvgvNLU@vbart-workstation> References: <1959760.0ShWjv0uEp@vbart-workstation> <3274060.dBGtzE6Y78@vbart-workstation> <1628062.LQhmvgvNLU@vbart-workstation> Message-ID: <1789562.RZ9SL3pRHj@vbart-workstation> On Wednesday 05 April 2017 18:55:08 Valentin V. Bartenev wrote: > On Wednesday 05 April 2017 18:13:52 Valentin V. Bartenev wrote: > > On Wednesday 05 April 2017 05:32:50 Piotr Sikora via nginx-devel wrote: > > > Hey Valentin, > > > > > > > # HG changeset patch > > > > # User Piotr Sikora > > > > # Date 1490516712 25200 > > > > # Sun Mar 26 01:25:12 2017 -0700 > > > > # Node ID 630a8209defe25add7094dfc7b9bc9bcabe0933d > > > > # Parent 22be63bf21edaa1b8ea916c7d8cd4e5fe4892061 > > > > HTTP/2: add fast-path for HTTP/2 requests without request body. > > > > > > > > Signed-off-by: Piotr Sikora > > > > > > > > diff -r 22be63bf21ed -r 630a8209defe src/http/v2/ngx_http_v2.c > > > > --- a/src/http/v2/ngx_http_v2.c > > > > +++ b/src/http/v2/ngx_http_v2.c > > > > @@ -3520,6 +3520,12 @@ ngx_http_v2_read_request_body(ngx_http_r > > > > > > > > r->request_body = rb; > > > > > > > > + if (stream->in_closed && stream->preread == NULL) { > > > > + r->request_body_no_buffering = 0; > > > > + post_handler(r); > > > > + return NGX_OK; > > > > + } > > > > + > > > > h2scf = ngx_http_get_module_srv_conf(r, ngx_http_v2_module); > > > > clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); > > > > > > > > > > Any thoughts on the updated patch? Thanks! > > > > > [..] > > > > With your patch the behavior is different in these cases: > > > > GET / HTTP/1.1 > > Host: example.com > > Transfer-Encoding: chunked > > > > 0 > > > > and > > > > HEADERS > > DATA length:0 END_STREAM > > > > Moreover, it depends on the time when DATA frame is processed: > > before ngx_http_read_request_body() call or after. > > > > [..] > > or another way: > > # HG changeset patch > # User Valentin Bartenev > # Date 1491407679 -10800 > # Wed Apr 05 18:54:39 2017 +0300 > # Node ID 3398c1d446dddc4d1677370f9c8189e6aa4ff4e8 > # Parent 29ba1d6a2da9320e68ef2b7a2516c4c424672ea8 > HTTP/2: reduced difference to HTTP/1.x in reading request body. > > This also eliminates difference in behavior for requests without body. > [..] Fixed version of the last patch with preserved check for "skip_data". # HG changeset patch # User Valentin Bartenev # Date 1491416148 -10800 # Wed Apr 05 21:15:48 2017 +0300 # Node ID d70733b5e314b982436e72dc275ada7e8329d604 # Parent 29ba1d6a2da9320e68ef2b7a2516c4c424672ea8 HTTP/2: reduced difference to HTTP/1.x in reading request body. Particularly, this eliminates difference in behavior for requests without body and deduplicates code. diff -r 29ba1d6a2da9 -r d70733b5e314 src/http/ngx_http_request_body.c --- a/src/http/ngx_http_request_body.c Tue Apr 04 18:01:57 2017 +0300 +++ b/src/http/ngx_http_request_body.c Wed Apr 05 21:15:48 2017 +0300 @@ -46,13 +46,6 @@ ngx_http_read_client_request_body(ngx_ht return NGX_OK; } -#if (NGX_HTTP_V2) - if (r->stream) { - rc = ngx_http_v2_read_request_body(r, post_handler); - goto done; - } -#endif - if (ngx_http_test_expect(r) != NGX_OK) { rc = NGX_HTTP_INTERNAL_SERVER_ERROR; goto done; @@ -85,6 +78,13 @@ ngx_http_read_client_request_body(ngx_ht return NGX_OK; } +#if (NGX_HTTP_V2) + if (r->stream) { + rc = ngx_http_v2_read_request_body(r); + goto done; + } +#endif + preread = r->header_in->last - r->header_in->pos; if (preread) { @@ -805,7 +805,8 @@ ngx_http_test_expect(ngx_http_request_t if (r->expect_tested || r->headers_in.expect == NULL - || r->http_version < NGX_HTTP_VERSION_11) + || r->http_version < NGX_HTTP_VERSION_11 + || r->http_version == NGX_HTTP_VERSION_20) { return NGX_OK; } diff -r 29ba1d6a2da9 -r d70733b5e314 src/http/v2/ngx_http_v2.c --- a/src/http/v2/ngx_http_v2.c Tue Apr 04 18:01:57 2017 +0300 +++ b/src/http/v2/ngx_http_v2.c Wed Apr 05 21:15:48 2017 +0300 @@ -3484,8 +3484,7 @@ ngx_http_v2_run_request(ngx_http_request ngx_int_t -ngx_http_v2_read_request_body(ngx_http_request_t *r, - ngx_http_client_body_handler_pt post_handler) +ngx_http_v2_read_request_body(ngx_http_request_t *r) { off_t len; size_t size; @@ -3498,33 +3497,14 @@ ngx_http_v2_read_request_body(ngx_http_r ngx_http_v2_connection_t *h2c; stream = r->stream; + rb = r->request_body; if (stream->skip_data) { r->request_body_no_buffering = 0; - post_handler(r); + rb->post_handler(r); return NGX_OK; } - rb = ngx_pcalloc(r->pool, sizeof(ngx_http_request_body_t)); - if (rb == NULL) { - return NGX_HTTP_INTERNAL_SERVER_ERROR; - } - - /* - * set by ngx_pcalloc(): - * - * rb->bufs = NULL; - * rb->buf = NULL; - * rb->received = 0; - * rb->free = NULL; - * rb->busy = NULL; - */ - - rb->rest = 1; - rb->post_handler = post_handler; - - r->request_body = rb; - h2scf = ngx_http_get_module_srv_conf(r, ngx_http_v2_module); clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); @@ -3574,6 +3554,8 @@ ngx_http_v2_read_request_body(ngx_http_r return NGX_HTTP_INTERNAL_SERVER_ERROR; } + rb->rest = 1; + buf = stream->preread; if (stream->in_closed) { diff -r 29ba1d6a2da9 -r d70733b5e314 src/http/v2/ngx_http_v2.h --- a/src/http/v2/ngx_http_v2.h Tue Apr 04 18:01:57 2017 +0300 +++ b/src/http/v2/ngx_http_v2.h Wed Apr 05 21:15:48 2017 +0300 @@ -264,8 +264,7 @@ ngx_http_v2_queue_blocked_frame(ngx_http void ngx_http_v2_init(ngx_event_t *rev); void ngx_http_v2_request_headers_init(void); -ngx_int_t ngx_http_v2_read_request_body(ngx_http_request_t *r, - ngx_http_client_body_handler_pt post_handler); +ngx_int_t ngx_http_v2_read_request_body(ngx_http_request_t *r); ngx_int_t ngx_http_v2_read_unbuffered_request_body(ngx_http_request_t *r); void ngx_http_v2_close_stream(ngx_http_v2_stream_t *stream, ngx_int_t rc); From vbart at nginx.com Thu Apr 6 14:02:19 2017 From: vbart at nginx.com (Valentin V. Bartenev) Date: Thu, 06 Apr 2017 17:02:19 +0300 Subject: [PATCH] HTTP/2: add debug logging of pseudo-headers In-Reply-To: <3d72ae17c41990774721.1491275614@piotrsikora.sfo.corp.google.com> References: <3d72ae17c41990774721.1491275614@piotrsikora.sfo.corp.google.com> Message-ID: <6166656.7LtoHmd8e7@vbart-workstation> On Monday 03 April 2017 20:13:34 Piotr Sikora via nginx-devel wrote: > # HG changeset patch > # User Piotr Sikora > # Date 1490516711 25200 > # Sun Mar 26 01:25:11 2017 -0700 > # Node ID 3d72ae17c41990774721a678c50b8307ecb684c8 > # Parent 22be63bf21edaa1b8ea916c7d8cd4e5fe4892061 > HTTP/2: add debug logging of pseudo-headers. > > Signed-off-by: Piotr Sikora > > diff -r 22be63bf21ed -r 3d72ae17c419 src/http/v2/ngx_http_v2.c > --- a/src/http/v2/ngx_http_v2.c > +++ b/src/http/v2/ngx_http_v2.c > @@ -1585,6 +1585,10 @@ ngx_http_v2_state_process_header(ngx_htt > rc = ngx_http_v2_pseudo_header(r, header); > > if (rc == NGX_OK) { > + ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, > + "http2 http header: \":%V: %V\"", > + &header->name, &header->value); > + > return ngx_http_v2_state_header_complete(h2c, pos, end); > } > Maybe "http2 pseudo-header: \":%V: %V\""? Because it doesn't look like a valid "http header". wbr, Valentin V. Bartenev From vbart at nginx.com Thu Apr 6 14:31:04 2017 From: vbart at nginx.com (Valentin V. Bartenev) Date: Thu, 06 Apr 2017 17:31:04 +0300 Subject: [PATCH] HTTP/2: add debug logging of control frames In-Reply-To: <06d6418afe6e73604aea.1491275620@piotrsikora.sfo.corp.google.com> References: <06d6418afe6e73604aea.1491275620@piotrsikora.sfo.corp.google.com> Message-ID: <1619400.xHm06BXEHk@vbart-workstation> On Monday 03 April 2017 20:13:40 Piotr Sikora via nginx-devel wrote: > # HG changeset patch > # User Piotr Sikora > # Date 1490516711 25200 > # Sun Mar 26 01:25:11 2017 -0700 > # Node ID 06d6418afe6e73604aea707ef9c5802f5bf27bf4 > # Parent 22be63bf21edaa1b8ea916c7d8cd4e5fe4892061 > HTTP/2: add debug logging of control frames. > > Signed-off-by: Piotr Sikora > > diff -r 22be63bf21ed -r 06d6418afe6e src/http/v2/ngx_http_v2.c > --- a/src/http/v2/ngx_http_v2.c > +++ b/src/http/v2/ngx_http_v2.c [..] > @@ -2449,8 +2468,18 @@ ngx_http_v2_send_settings(ngx_http_v2_co > ngx_http_v2_srv_conf_t *h2scf; > ngx_http_v2_out_frame_t *frame; > > - ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, > - "http2 send SETTINGS frame ack:%ui", ack); > + if (ack) { > + ngx_log_debug0(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, > + "http2 send SETTINGS frame ack:1"); > + > + len = 0; > + > + } else { > + ngx_log_debug0(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, > + "http2 send SETTINGS frame params:3"); > + > + len = NGX_HTTP_V2_SETTINGS_PARAM_SIZE * 3; > + } > > frame = ngx_palloc(h2c->pool, sizeof(ngx_http_v2_out_frame_t)); > if (frame == NULL) { > @@ -2462,8 +2491,6 @@ ngx_http_v2_send_settings(ngx_http_v2_co > return NGX_ERROR; > } > > - len = ack ? 0 : (sizeof(uint16_t) + sizeof(uint32_t)) * 3; > - > buf = ngx_create_temp_buf(h2c->pool, NGX_HTTP_V2_FRAME_HEADER_SIZE + len); > if (buf == NULL) { > return NGX_ERROR; > @@ -2494,15 +2521,27 @@ ngx_http_v2_send_settings(ngx_http_v2_co > h2scf = ngx_http_get_module_srv_conf(h2c->http_connection->conf_ctx, > ngx_http_v2_module); > > + ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, > + "http2 send SETTINGS frame MAX_CONCURRENT_STREAMS:%ui", > + h2scf->concurrent_streams); > + > buf->last = ngx_http_v2_write_uint16(buf->last, > NGX_HTTP_V2_MAX_STREAMS_SETTING); > buf->last = ngx_http_v2_write_uint32(buf->last, > h2scf->concurrent_streams); > > + ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, > + "http2 send SETTINGS frame INITIAL_WINDOW_SIZE:%uz", > + h2scf->preread_size); > + > buf->last = ngx_http_v2_write_uint16(buf->last, > NGX_HTTP_V2_INIT_WINDOW_SIZE_SETTING); > buf->last = ngx_http_v2_write_uint32(buf->last, h2scf->preread_size); > > + ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, > + "http2 send SETTINGS frame MAX_FRAME_SIZE:%ud", > + NGX_HTTP_V2_MAX_FRAME_SIZE); > + > buf->last = ngx_http_v2_write_uint16(buf->last, > NGX_HTTP_V2_MAX_FRAME_SIZE_SETTING); > buf->last = ngx_http_v2_write_uint32(buf->last, You can always find these values in configuration, and I can't remember a case where I've ever needed them. On the contrary, there's always a problem with the huge size of typical http/2 debug log. So it's not a good idea to add something just because we can. wbr, Valentin V. Bartenev From mdounin at mdounin.ru Thu Apr 6 16:24:21 2017 From: mdounin at mdounin.ru (Maxim Dounin) Date: Thu, 6 Apr 2017 19:24:21 +0300 Subject: [PATCH] Contrib: vim syntax, support block region In-Reply-To: References: <20170303172428.GM34777@mdounin.ru> Message-ID: <20170406162421.GX13617@mdounin.ru> Hello! On Sat, Mar 04, 2017 at 07:59:31PM +0800, othree wrote: > # HG changeset patch > # User othree > # Date 1488628696 -28800 > # Sat Mar 04 19:58:16 2017 +0800 > # Node ID a244d5f635ebf90cd30c42f826810b9bf5d53f3c > # Parent 7fca6f60d5cafa0127b5bc4d6b74fcd06ab532a3 > Contrib: vim syntax, support block region. Sorry for long delay, see comments below. > diff --git a/contrib/vim/syntax/nginx.vim b/contrib/vim/syntax/nginx.vim > --- a/contrib/vim/syntax/nginx.vim > +++ b/contrib/vim/syntax/nginx.vim > @@ -4,43 +4,66 @@ > if exists("b:current_syntax") > finish > end > > setlocal iskeyword+=. > setlocal iskeyword+=/ > setlocal iskeyword+=: > > -syn match ngxVariable '\$\(\w\+\|{\w\+}\)' > -syn match ngxVariableBlock '\$\(\w\+\|{\w\+}\)' contained > -syn match ngxVariableString '\$\(\w\+\|{\w\+}\)' contained > -syn region ngxBlock start=+^+ end=+{+ skip=+\${+ contains=ngxComment,ngxDirectiveBlock,ngxVariableBlock,ngxString oneline > -syn region ngxString start=+[^:a-zA-Z>!\\@]\z(["']\)+lc=1 end=+\z1+ skip=+\\\\\|\\\z1+ contains=ngxVariableString > -syn match ngxComment ' *#.*$' > +syn match ngxVariable '\$\(\w\+\|{\w\+}\)' > +syn match ngxVariableString '\$\(\w\+\|{\w\+}\)' contained > + > +syn region ngxString start=+\%(^\|\s\)\zs\z(["']\)+ end=+\z1+ skip=+\\\\\|\\\z1+ contains=ngxVariableString > +syn region ngxComment start=+\%(^\|\s\)\zs#+ end=+$+ oneline Note: this fails to properly detect strings and comments when the previous directive was just ended or a new block just started, for example: access_log off;"access_log" foo; access_log off;# comment server {# comment }# comment > > syn keyword ngxBoolean on > syn keyword ngxBoolean off > > -syn keyword ngxDirectiveBlock http contained > -syn keyword ngxDirectiveBlock mail contained > -syn keyword ngxDirectiveBlock events contained > -syn keyword ngxDirectiveBlock server contained > -syn keyword ngxDirectiveBlock types contained > -syn keyword ngxDirectiveBlock location contained > -syn keyword ngxDirectiveBlock upstream contained > -syn keyword ngxDirectiveBlock charset_map contained > -syn keyword ngxDirectiveBlock limit_except contained > -syn keyword ngxDirectiveBlock if contained > -syn keyword ngxDirectiveBlock geo contained > -syn keyword ngxDirectiveBlock map contained > -syn keyword ngxDirectiveBlock split_clients contained > +syn match ngxDirectiveBlockParams /\S\+/ contains=ngxVariableString contained nextgroup=ngxDirectiveBlockParams,ngxBlock skipwhite skipempty > +syn match ngxDirectiveBlockParam1 /\S\+/ contains=ngxVariableString contained nextgroup=ngxDirectiveBlockParam2 skipwhite skipempty > +syn match ngxDirectiveBlockParam2 /\S\+/ contains=ngxVariableString contained nextgroup=ngxBlock skipwhite skipempty > +syn region ngxDirectiveBlockParams start=+\%(^\|\s\)\zs\z(["']\)+ end=+\z1+ skip=+\\\\\|\\\z1+ contains=ngxVariableString contained nextgroup=ngxDirectiveBlockParams,ngxBlock skipwhite skipempty > +syn region ngxDirectiveBlockParam1 start=+\%(^\|\s\)\zs\z(["']\)+ end=+\z1+ skip=+\\\\\|\\\z1+ contains=ngxVariableString contained nextgroup=ngxDirectiveBlockParam2 skipwhite skipempty > +syn region ngxDirectiveBlockParam2 start=+\%(^\|\s\)\zs\z(["']\)+ end=+\z1+ skip=+\\\\\|\\\z1+ contains=ngxVariableString contained nextgroup=ngxBlock skipwhite skipempty > + > +syn cluster ngxDirectives contains=ngxDirectiveBlock,ngxDirectiveImportant,ngxDirectiveControl,ngxDirectiveError,ngxDirectiveDeprecated,ngxDirective,ngxDirectiveThirdParty > +syn cluster ngxBlockDirectives contains=@ngxDirectives,ngxReservedMainContextDirective > +syn cluster ngxBlockElements contains=@ngxBlockDirectives,ngxVariable,ngxString,ngxComment,ngxBoolean > + > +syn region ngxBlock start=+{+ end=+}+ contained contains=@ngxBlockElements > +syn region ngxServerBlock start=+{+ end=+}+ contained contains=@ngxBlockElements,ngxReservedServerContextDirective > +syn region ngxUpstreamBlock start=+{+ end=+}+ contained contains=@ngxBlockElements,ngxDirectiveServer > + > +syn keyword ngxDirectiveBlock http nextgroup=ngxBlock skipwhite skipempty > +syn keyword ngxDirectiveBlock mail nextgroup=ngxBlock skipwhite skipempty > +syn keyword ngxDirectiveBlock events nextgroup=ngxBlock skipwhite skipempty > +syn keyword ngxDirectiveBlock server nextgroup=ngxServerBlock skipwhite skipempty > +syn keyword ngxDirectiveBlock types nextgroup=ngxBlock skipwhite skipempty > + > +syn match ngxLocationPath /\S\+/ contained nextgroup=ngxBlock skipwhite skipempty > +syn region ngxLocationPath start=+\%(^\|\s\)\zs\z(["']\)+lc=1 end=+\z1+ skip=+\\\\\|\\\z1+ contains=ngxVariableString contained nextgroup=ngxBlock skipwhite skipempty > +syn match ngxLocationOperator /\(=\|\~\*\|\^\~\|\~\)/ contained nextgroup=ngxLocationPath skipwhite skipempty > +syn match ngxLocationNamedLoc /@\w\+/ > +syn keyword ngxDirectiveBlock location nextgroup=ngxLocationNamedLoc,ngxLocationOperator,ngxLocationPath,ngxString skipwhite skipempty > + > +syn keyword ngxDirectiveBlock upstream nextgroup=ngxUpstreamBlock skipwhite skipempty > +syn keyword ngxDirectiveBlock charset_map nextgroup=ngxDirectiveBlockParam1 skipwhite skipempty > +syn keyword ngxDirectiveBlock limit_except nextgroup=ngxDirectiveBlockParams skipwhite skipempty > +syn keyword ngxDirectiveBlock if nextgroup=ngxBlock skipwhite skipempty > +syn keyword ngxDirectiveBlock geo nextgroup=ngxBlock skipwhite skipempty > +syn keyword ngxDirectiveBlock map nextgroup=ngxDirectiveBlockParam1 skipwhite skipempty > +syn keyword ngxDirectiveBlock split_clients nextgroup=ngxDirectiveBlockParam1 skipwhite skipempty This looks overcomplicated and not really extendable. I was rather thinking of something which at least allow vim to parse arbitrary directives properly. I've looked into this, and generic syntax rules seems to be easy enough to implement: syn match ngxName '\([^;{} \t\\]\|\\.\)\+' \ contains=@ngxDirectives \ nextgroup=@ngxParams skipwhite skipempty syn match ngxParam '\([^;{ \t\\]\|\\.\)\+' \ contained \ contains=ngxVariable \ nextgroup=@ngxParams skipwhite skipempty syn region ngxString start=+\z(["']\)+ end=+\z1+ skip=+\\\\\|\\\z1+ \ contains=ngxVariableString \ nextgroup=@ngxParams skipwhite skipempty syn match ngxParamComment '#.*$' \ nextgroup=@ngxParams skipwhite skipempty syn keyword ngxBoolean contained on off \ nextgroup=@ngxParams skipwhite skipempty syn match ngxSemicolon ';' contained syn region ngxBlock start=+{+ end=+}+ contained \ contains=@ngxTopLevel syn match ngxComment '#.*$' syn match ngxVariable '\$\w\+' contained syn match ngxVariableString '\$\(\w\+\|{\w\+}\)' contained syn cluster ngxTopLevel \ contains=ngxName,ngxString,ngxComment syn cluster ngxDirectives \ contains=ngxDirective,ngxDirectiveBlock,ngxDirectiveImportant \ add=ngxDirectiveControl,ngxDirectiveError,ngxDirectiveDeprecated \ add=ngxDirectiveThirdParty syn cluster ngxParams \ contains=ngxParam,ngxString,ngxParamComment,ngxSemicolon,ngxBlock \ add=ngxBoolean Unfortunately, this approach doesn't allow to extend things easily with highlighting of directive-specific parameters, and doesn't allow to do proper nesting checks. Though it seems to fix lots of parsing and highlighting bugs in complex cases, including the ones mentioned above. It also makes visible things like missing semicolon in server_name foo bar listen 80; and other similar cases. Proof-of-concept patch below. # HG changeset patch # User Maxim Dounin # Date 1491495537 -10800 # Thu Apr 06 19:18:57 2017 +0300 # Node ID c66ed97ff052e2dd9d1f20af293eb54a3da38306 # Parent 29ba1d6a2da9320e68ef2b7a2516c4c424672ea8 Contrib: proper syntax parsing. diff --git a/contrib/vim/syntax/nginx.vim b/contrib/vim/syntax/nginx.vim --- a/contrib/vim/syntax/nginx.vim +++ b/contrib/vim/syntax/nginx.vim @@ -5,2115 +5,2139 @@ if exists("b:current_syntax") finish end -setlocal iskeyword+=. -setlocal iskeyword+=/ -setlocal iskeyword+=: - -syn match ngxVariable '\$\(\w\+\|{\w\+}\)' -syn match ngxVariableBlock '\$\(\w\+\|{\w\+}\)' contained -syn match ngxVariableString '\$\(\w\+\|{\w\+}\)' contained -syn region ngxBlock start=+^+ end=+{+ skip=+\${+ contains=ngxComment,ngxDirectiveBlock,ngxVariableBlock,ngxString oneline -syn region ngxString start=+[^:a-zA-Z>!\\@]\z(["']\)+lc=1 end=+\z1+ skip=+\\\\\|\\\z1+ contains=ngxVariableString -syn match ngxComment ' *#.*$' - -syn keyword ngxBoolean on -syn keyword ngxBoolean off - -syn keyword ngxDirectiveBlock http contained -syn keyword ngxDirectiveBlock mail contained -syn keyword ngxDirectiveBlock events contained -syn keyword ngxDirectiveBlock server contained -syn keyword ngxDirectiveBlock types contained -syn keyword ngxDirectiveBlock location contained -syn keyword ngxDirectiveBlock upstream contained -syn keyword ngxDirectiveBlock charset_map contained -syn keyword ngxDirectiveBlock limit_except contained -syn keyword ngxDirectiveBlock if contained -syn keyword ngxDirectiveBlock geo contained -syn keyword ngxDirectiveBlock map contained -syn keyword ngxDirectiveBlock split_clients contained - -syn keyword ngxDirectiveImportant include -syn keyword ngxDirectiveImportant root -syn keyword ngxDirectiveImportant server -syn keyword ngxDirectiveImportant server_name -syn keyword ngxDirectiveImportant listen contained -syn region ngxDirectiveImportantListen matchgroup=ngxDirectiveImportant start=+listen+ skip=+\\\\\|\\\;+ end=+;+he=e-1 contains=ngxListenOptions,ngxString -syn keyword ngxDirectiveImportant internal -syn keyword ngxDirectiveImportant proxy_pass -syn keyword ngxDirectiveImportant memcached_pass -syn keyword ngxDirectiveImportant fastcgi_pass -syn keyword ngxDirectiveImportant scgi_pass -syn keyword ngxDirectiveImportant uwsgi_pass -syn keyword ngxDirectiveImportant try_files - -syn keyword ngxListenOptions default_server contained -syn keyword ngxListenOptions ssl contained -syn keyword ngxListenOptions http2 contained -syn keyword ngxListenOptions spdy contained -syn keyword ngxListenOptions proxy_protocol contained -syn keyword ngxListenOptions setfib contained -syn keyword ngxListenOptions fastopen contained -syn keyword ngxListenOptions backlog contained -syn keyword ngxListenOptions rcvbuf contained -syn keyword ngxListenOptions sndbuf contained -syn keyword ngxListenOptions accept_filter contained -syn keyword ngxListenOptions deferred contained -syn keyword ngxListenOptions bind contained -syn keyword ngxListenOptions ipv6only contained -syn keyword ngxListenOptions reuseport contained -syn keyword ngxListenOptions so_keepalive contained -syn keyword ngxListenOptions keepidle contained - -syn keyword ngxDirectiveControl break -syn keyword ngxDirectiveControl return -syn keyword ngxDirectiveControl rewrite -syn keyword ngxDirectiveControl set - -syn keyword ngxDirectiveError error_page -syn keyword ngxDirectiveError post_action - -syn keyword ngxDirectiveDeprecated connections -syn keyword ngxDirectiveDeprecated imap -syn keyword ngxDirectiveDeprecated limit_zone -syn keyword ngxDirectiveDeprecated mysql_test -syn keyword ngxDirectiveDeprecated open_file_cache_retest -syn keyword ngxDirectiveDeprecated optimize_server_names -syn keyword ngxDirectiveDeprecated satisfy_any -syn keyword ngxDirectiveDeprecated so_keepalive +syn match ngxName '\([^;{} \t\\]\|\\.\)\+' + \ contains=@ngxDirectives + \ nextgroup=@ngxParams skipwhite skipempty +syn match ngxParam '\([^;{ \t\\]\|\\.\)\+' + \ contained + \ contains=ngxVariable + \ nextgroup=@ngxParams skipwhite skipempty +syn region ngxString start=+\z(["']\)+ end=+\z1+ skip=+\\\\\|\\\z1+ + \ contains=ngxVariableString + \ nextgroup=@ngxParams skipwhite skipempty +syn match ngxParamComment '#.*$' + \ nextgroup=@ngxParams skipwhite skipempty +syn keyword ngxBoolean contained on off + \ nextgroup=@ngxParams skipwhite skipempty +syn match ngxSemicolon ';' contained +syn region ngxBlock start=+{+ end=+}+ contained + \ contains=@ngxTopLevel +syn match ngxComment '#.*$' -syn keyword ngxDirective absolute_redirect -syn keyword ngxDirective accept_mutex -syn keyword ngxDirective accept_mutex_delay -syn keyword ngxDirective acceptex_read -syn keyword ngxDirective access_log -syn keyword ngxDirective add_after_body -syn keyword ngxDirective add_before_body -syn keyword ngxDirective add_header -syn keyword ngxDirective addition_types -syn keyword ngxDirective aio -syn keyword ngxDirective aio_write -syn keyword ngxDirective alias -syn keyword ngxDirective allow -syn keyword ngxDirective ancient_browser -syn keyword ngxDirective ancient_browser_value -syn keyword ngxDirective auth_basic -syn keyword ngxDirective auth_basic_user_file -syn keyword ngxDirective auth_http -syn keyword ngxDirective auth_http_header -syn keyword ngxDirective auth_http_pass_client_cert -syn keyword ngxDirective auth_http_timeout -syn keyword ngxDirective auth_jwt -syn keyword ngxDirective auth_jwt_key_file -syn keyword ngxDirective auth_request -syn keyword ngxDirective auth_request_set -syn keyword ngxDirective autoindex -syn keyword ngxDirective autoindex_exact_size -syn keyword ngxDirective autoindex_format -syn keyword ngxDirective autoindex_localtime -syn keyword ngxDirective charset -syn keyword ngxDirective charset_map -syn keyword ngxDirective charset_types -syn keyword ngxDirective chunked_transfer_encoding -syn keyword ngxDirective client_body_buffer_size -syn keyword ngxDirective client_body_in_file_only -syn keyword ngxDirective client_body_in_single_buffer -syn keyword ngxDirective client_body_temp_path -syn keyword ngxDirective client_body_timeout -syn keyword ngxDirective client_header_buffer_size -syn keyword ngxDirective client_header_timeout -syn keyword ngxDirective client_max_body_size -syn keyword ngxDirective connection_pool_size -syn keyword ngxDirective create_full_put_path -syn keyword ngxDirective daemon -syn keyword ngxDirective dav_access -syn keyword ngxDirective dav_methods -syn keyword ngxDirective debug_connection -syn keyword ngxDirective debug_points -syn keyword ngxDirective default_type -syn keyword ngxDirective degradation -syn keyword ngxDirective degrade -syn keyword ngxDirective deny -syn keyword ngxDirective devpoll_changes -syn keyword ngxDirective devpoll_events -syn keyword ngxDirective directio -syn keyword ngxDirective directio_alignment -syn keyword ngxDirective disable_symlinks -syn keyword ngxDirective empty_gif -syn keyword ngxDirective env -syn keyword ngxDirective epoll_events -syn keyword ngxDirective error_log -syn keyword ngxDirective etag -syn keyword ngxDirective eventport_events -syn keyword ngxDirective expires -syn keyword ngxDirective f4f -syn keyword ngxDirective f4f_buffer_size -syn keyword ngxDirective fastcgi_bind -syn keyword ngxDirective fastcgi_buffer_size -syn keyword ngxDirective fastcgi_buffering -syn keyword ngxDirective fastcgi_buffers -syn keyword ngxDirective fastcgi_busy_buffers_size -syn keyword ngxDirective fastcgi_cache -syn keyword ngxDirective fastcgi_cache_bypass -syn keyword ngxDirective fastcgi_cache_key -syn keyword ngxDirective fastcgi_cache_lock -syn keyword ngxDirective fastcgi_cache_lock_age -syn keyword ngxDirective fastcgi_cache_lock_timeout -syn keyword ngxDirective fastcgi_cache_max_range_offset -syn keyword ngxDirective fastcgi_cache_methods -syn keyword ngxDirective fastcgi_cache_min_uses -syn keyword ngxDirective fastcgi_cache_path -syn keyword ngxDirective fastcgi_cache_purge -syn keyword ngxDirective fastcgi_cache_revalidate -syn keyword ngxDirective fastcgi_cache_use_stale -syn keyword ngxDirective fastcgi_cache_valid -syn keyword ngxDirective fastcgi_catch_stderr -syn keyword ngxDirective fastcgi_connect_timeout -syn keyword ngxDirective fastcgi_force_ranges -syn keyword ngxDirective fastcgi_hide_header -syn keyword ngxDirective fastcgi_ignore_client_abort -syn keyword ngxDirective fastcgi_ignore_headers -syn keyword ngxDirective fastcgi_index -syn keyword ngxDirective fastcgi_intercept_errors -syn keyword ngxDirective fastcgi_keep_conn -syn keyword ngxDirective fastcgi_limit_rate -syn keyword ngxDirective fastcgi_max_temp_file_size -syn keyword ngxDirective fastcgi_next_upstream -syn keyword ngxDirective fastcgi_next_upstream_timeout -syn keyword ngxDirective fastcgi_next_upstream_tries -syn keyword ngxDirective fastcgi_no_cache -syn keyword ngxDirective fastcgi_param -syn keyword ngxDirective fastcgi_pass_header -syn keyword ngxDirective fastcgi_pass_request_body -syn keyword ngxDirective fastcgi_pass_request_headers -syn keyword ngxDirective fastcgi_read_timeout -syn keyword ngxDirective fastcgi_request_buffering -syn keyword ngxDirective fastcgi_send_lowat -syn keyword ngxDirective fastcgi_send_timeout -syn keyword ngxDirective fastcgi_split_path_info -syn keyword ngxDirective fastcgi_store -syn keyword ngxDirective fastcgi_store_access -syn keyword ngxDirective fastcgi_temp_file_write_size -syn keyword ngxDirective fastcgi_temp_path -syn keyword ngxDirective flv -syn keyword ngxDirective geoip_city -syn keyword ngxDirective geoip_country -syn keyword ngxDirective geoip_org -syn keyword ngxDirective geoip_proxy -syn keyword ngxDirective geoip_proxy_recursive -syn keyword ngxDirective google_perftools_profiles -syn keyword ngxDirective gunzip -syn keyword ngxDirective gunzip_buffers -syn keyword ngxDirective gzip -syn keyword ngxDirective gzip_buffers -syn keyword ngxDirective gzip_comp_level -syn keyword ngxDirective gzip_disable -syn keyword ngxDirective gzip_hash -syn keyword ngxDirective gzip_http_version -syn keyword ngxDirective gzip_min_length -syn keyword ngxDirective gzip_no_buffer -syn keyword ngxDirective gzip_proxied -syn keyword ngxDirective gzip_static -syn keyword ngxDirective gzip_types -syn keyword ngxDirective gzip_vary -syn keyword ngxDirective gzip_window -syn keyword ngxDirective hash -syn keyword ngxDirective health_check -syn keyword ngxDirective health_check_timeout -syn keyword ngxDirective hls -syn keyword ngxDirective hls_buffers -syn keyword ngxDirective hls_forward_args -syn keyword ngxDirective hls_fragment -syn keyword ngxDirective hls_mp4_buffer_size -syn keyword ngxDirective hls_mp4_max_buffer_size -syn keyword ngxDirective http2_chunk_size -syn keyword ngxDirective http2_body_preread_size -syn keyword ngxDirective http2_idle_timeout -syn keyword ngxDirective http2_max_concurrent_streams -syn keyword ngxDirective http2_max_field_size -syn keyword ngxDirective http2_max_header_size -syn keyword ngxDirective http2_max_requests -syn keyword ngxDirective http2_recv_buffer_size -syn keyword ngxDirective http2_recv_timeout -syn keyword ngxDirective if_modified_since -syn keyword ngxDirective ignore_invalid_headers -syn keyword ngxDirective image_filter -syn keyword ngxDirective image_filter_buffer -syn keyword ngxDirective image_filter_interlace -syn keyword ngxDirective image_filter_jpeg_quality -syn keyword ngxDirective image_filter_sharpen -syn keyword ngxDirective image_filter_transparency -syn keyword ngxDirective image_filter_webp_quality -syn keyword ngxDirective imap_auth -syn keyword ngxDirective imap_capabilities -syn keyword ngxDirective imap_client_buffer -syn keyword ngxDirective index -syn keyword ngxDirective iocp_threads -syn keyword ngxDirective ip_hash -syn keyword ngxDirective js_access -syn keyword ngxDirective js_content -syn keyword ngxDirective js_filter -syn keyword ngxDirective js_include -syn keyword ngxDirective js_preread -syn keyword ngxDirective js_set -syn keyword ngxDirective keepalive -syn keyword ngxDirective keepalive_disable -syn keyword ngxDirective keepalive_requests -syn keyword ngxDirective keepalive_timeout -syn keyword ngxDirective kqueue_changes -syn keyword ngxDirective kqueue_events -syn keyword ngxDirective large_client_header_buffers -syn keyword ngxDirective least_conn -syn keyword ngxDirective least_time -syn keyword ngxDirective limit_conn -syn keyword ngxDirective limit_conn_log_level -syn keyword ngxDirective limit_conn_status -syn keyword ngxDirective limit_conn_zone -syn keyword ngxDirective limit_rate -syn keyword ngxDirective limit_rate_after -syn keyword ngxDirective limit_req -syn keyword ngxDirective limit_req_log_level -syn keyword ngxDirective limit_req_status -syn keyword ngxDirective limit_req_zone -syn keyword ngxDirective lingering_close -syn keyword ngxDirective lingering_time -syn keyword ngxDirective lingering_timeout -syn keyword ngxDirective load_module -syn keyword ngxDirective lock_file -syn keyword ngxDirective log_format -syn keyword ngxDirective log_not_found -syn keyword ngxDirective log_subrequest -syn keyword ngxDirective map_hash_bucket_size -syn keyword ngxDirective map_hash_max_size -syn keyword ngxDirective match -syn keyword ngxDirective master_process -syn keyword ngxDirective max_ranges -syn keyword ngxDirective memcached_bind -syn keyword ngxDirective memcached_buffer_size -syn keyword ngxDirective memcached_connect_timeout -syn keyword ngxDirective memcached_force_ranges -syn keyword ngxDirective memcached_gzip_flag -syn keyword ngxDirective memcached_next_upstream -syn keyword ngxDirective memcached_next_upstream_timeout -syn keyword ngxDirective memcached_next_upstream_tries -syn keyword ngxDirective memcached_read_timeout -syn keyword ngxDirective memcached_send_timeout -syn keyword ngxDirective merge_slashes -syn keyword ngxDirective min_delete_depth -syn keyword ngxDirective modern_browser -syn keyword ngxDirective modern_browser_value -syn keyword ngxDirective mp4 -syn keyword ngxDirective mp4_buffer_size -syn keyword ngxDirective mp4_max_buffer_size -syn keyword ngxDirective mp4_limit_rate -syn keyword ngxDirective mp4_limit_rate_after -syn keyword ngxDirective msie_padding -syn keyword ngxDirective msie_refresh -syn keyword ngxDirective multi_accept -syn keyword ngxDirective ntlm -syn keyword ngxDirective open_file_cache -syn keyword ngxDirective open_file_cache_errors -syn keyword ngxDirective open_file_cache_events -syn keyword ngxDirective open_file_cache_min_uses -syn keyword ngxDirective open_file_cache_valid -syn keyword ngxDirective open_log_file_cache -syn keyword ngxDirective output_buffers -syn keyword ngxDirective override_charset -syn keyword ngxDirective pcre_jit -syn keyword ngxDirective perl -syn keyword ngxDirective perl_modules -syn keyword ngxDirective perl_require -syn keyword ngxDirective perl_set -syn keyword ngxDirective pid -syn keyword ngxDirective pop3_auth -syn keyword ngxDirective pop3_capabilities -syn keyword ngxDirective port_in_redirect -syn keyword ngxDirective post_acceptex -syn keyword ngxDirective postpone_gzipping -syn keyword ngxDirective postpone_output -syn keyword ngxDirective preread_buffer_size -syn keyword ngxDirective preread_timeout -syn keyword ngxDirective protocol nextgroup=ngxMailProtocol skipwhite -syn keyword ngxMailProtocol imap pop3 smtp contained -syn keyword ngxDirective proxy -syn keyword ngxDirective proxy_bind -syn keyword ngxDirective proxy_buffer -syn keyword ngxDirective proxy_buffer_size -syn keyword ngxDirective proxy_buffering -syn keyword ngxDirective proxy_buffers -syn keyword ngxDirective proxy_busy_buffers_size -syn keyword ngxDirective proxy_cache -syn keyword ngxDirective proxy_cache_bypass -syn keyword ngxDirective proxy_cache_convert_head -syn keyword ngxDirective proxy_cache_key -syn keyword ngxDirective proxy_cache_lock -syn keyword ngxDirective proxy_cache_lock_age -syn keyword ngxDirective proxy_cache_lock_timeout -syn keyword ngxDirective proxy_cache_max_range_offset -syn keyword ngxDirective proxy_cache_methods -syn keyword ngxDirective proxy_cache_min_uses -syn keyword ngxDirective proxy_cache_path -syn keyword ngxDirective proxy_cache_purge -syn keyword ngxDirective proxy_cache_revalidate -syn keyword ngxDirective proxy_cache_use_stale -syn keyword ngxDirective proxy_cache_valid -syn keyword ngxDirective proxy_connect_timeout -syn keyword ngxDirective proxy_cookie_domain -syn keyword ngxDirective proxy_cookie_path -syn keyword ngxDirective proxy_download_rate -syn keyword ngxDirective proxy_force_ranges -syn keyword ngxDirective proxy_headers_hash_bucket_size -syn keyword ngxDirective proxy_headers_hash_max_size -syn keyword ngxDirective proxy_hide_header -syn keyword ngxDirective proxy_http_version -syn keyword ngxDirective proxy_ignore_client_abort -syn keyword ngxDirective proxy_ignore_headers -syn keyword ngxDirective proxy_intercept_errors -syn keyword ngxDirective proxy_limit_rate -syn keyword ngxDirective proxy_max_temp_file_size -syn keyword ngxDirective proxy_method -syn keyword ngxDirective proxy_next_upstream -syn keyword ngxDirective proxy_next_upstream_timeout -syn keyword ngxDirective proxy_next_upstream_tries -syn keyword ngxDirective proxy_no_cache -syn keyword ngxDirective proxy_pass_error_message -syn keyword ngxDirective proxy_pass_header -syn keyword ngxDirective proxy_pass_request_body -syn keyword ngxDirective proxy_pass_request_headers -syn keyword ngxDirective proxy_protocol -syn keyword ngxDirective proxy_protocol_timeout -syn keyword ngxDirective proxy_read_timeout -syn keyword ngxDirective proxy_redirect -syn keyword ngxDirective proxy_request_buffering -syn keyword ngxDirective proxy_responses -syn keyword ngxDirective proxy_send_lowat -syn keyword ngxDirective proxy_send_timeout -syn keyword ngxDirective proxy_set_body -syn keyword ngxDirective proxy_set_header -syn keyword ngxDirective proxy_ssl_certificate -syn keyword ngxDirective proxy_ssl_certificate_key -syn keyword ngxDirective proxy_ssl_ciphers -syn keyword ngxDirective proxy_ssl_crl -syn keyword ngxDirective proxy_ssl_name -syn keyword ngxDirective proxy_ssl_password_file -syn keyword ngxDirective proxy_ssl_protocols nextgroup=ngxSSLProtocol skipwhite -syn keyword ngxDirective proxy_ssl_server_name -syn keyword ngxDirective proxy_ssl_session_reuse -syn keyword ngxDirective proxy_ssl_trusted_certificate -syn keyword ngxDirective proxy_ssl_verify -syn keyword ngxDirective proxy_ssl_verify_depth -syn keyword ngxDirective proxy_store -syn keyword ngxDirective proxy_store_access -syn keyword ngxDirective proxy_temp_file_write_size -syn keyword ngxDirective proxy_temp_path -syn keyword ngxDirective proxy_timeout -syn keyword ngxDirective proxy_upload_rate -syn keyword ngxDirective queue -syn keyword ngxDirective random_index -syn keyword ngxDirective read_ahead -syn keyword ngxDirective real_ip_header -syn keyword ngxDirective real_ip_recursive -syn keyword ngxDirective recursive_error_pages -syn keyword ngxDirective referer_hash_bucket_size -syn keyword ngxDirective referer_hash_max_size -syn keyword ngxDirective request_pool_size -syn keyword ngxDirective reset_timedout_connection -syn keyword ngxDirective resolver -syn keyword ngxDirective resolver_timeout -syn keyword ngxDirective rewrite_log -syn keyword ngxDirective rtsig_overflow_events -syn keyword ngxDirective rtsig_overflow_test -syn keyword ngxDirective rtsig_overflow_threshold -syn keyword ngxDirective rtsig_signo -syn keyword ngxDirective satisfy -syn keyword ngxDirective scgi_bind -syn keyword ngxDirective scgi_buffer_size -syn keyword ngxDirective scgi_buffering -syn keyword ngxDirective scgi_buffers -syn keyword ngxDirective scgi_busy_buffers_size -syn keyword ngxDirective scgi_cache -syn keyword ngxDirective scgi_cache_bypass -syn keyword ngxDirective scgi_cache_key -syn keyword ngxDirective scgi_cache_lock -syn keyword ngxDirective scgi_cache_lock_age -syn keyword ngxDirective scgi_cache_lock_timeout -syn keyword ngxDirective scgi_cache_max_range_offset -syn keyword ngxDirective scgi_cache_methods -syn keyword ngxDirective scgi_cache_min_uses -syn keyword ngxDirective scgi_cache_path -syn keyword ngxDirective scgi_cache_purge -syn keyword ngxDirective scgi_cache_revalidate -syn keyword ngxDirective scgi_cache_use_stale -syn keyword ngxDirective scgi_cache_valid -syn keyword ngxDirective scgi_connect_timeout -syn keyword ngxDirective scgi_force_ranges -syn keyword ngxDirective scgi_hide_header -syn keyword ngxDirective scgi_ignore_client_abort -syn keyword ngxDirective scgi_ignore_headers -syn keyword ngxDirective scgi_intercept_errors -syn keyword ngxDirective scgi_limit_rate -syn keyword ngxDirective scgi_max_temp_file_size -syn keyword ngxDirective scgi_next_upstream -syn keyword ngxDirective scgi_next_upstream_timeout -syn keyword ngxDirective scgi_next_upstream_tries -syn keyword ngxDirective scgi_no_cache -syn keyword ngxDirective scgi_param -syn keyword ngxDirective scgi_pass_header -syn keyword ngxDirective scgi_pass_request_body -syn keyword ngxDirective scgi_pass_request_headers -syn keyword ngxDirective scgi_read_timeout -syn keyword ngxDirective scgi_request_buffering -syn keyword ngxDirective scgi_send_timeout -syn keyword ngxDirective scgi_store -syn keyword ngxDirective scgi_store_access -syn keyword ngxDirective scgi_temp_file_write_size -syn keyword ngxDirective scgi_temp_path -syn keyword ngxDirective secure_link -syn keyword ngxDirective secure_link_md5 -syn keyword ngxDirective secure_link_secret -syn keyword ngxDirective send_lowat -syn keyword ngxDirective send_timeout -syn keyword ngxDirective sendfile -syn keyword ngxDirective sendfile_max_chunk -syn keyword ngxDirective server_name_in_redirect -syn keyword ngxDirective server_names_hash_bucket_size -syn keyword ngxDirective server_names_hash_max_size -syn keyword ngxDirective server_tokens -syn keyword ngxDirective session_log -syn keyword ngxDirective session_log_format -syn keyword ngxDirective session_log_zone -syn keyword ngxDirective set_real_ip_from -syn keyword ngxDirective slice -syn keyword ngxDirective smtp_auth -syn keyword ngxDirective smtp_capabilities -syn keyword ngxDirective smtp_client_buffer -syn keyword ngxDirective smtp_greeting_delay -syn keyword ngxDirective source_charset -syn keyword ngxDirective spdy_chunk_size -syn keyword ngxDirective spdy_headers_comp -syn keyword ngxDirective spdy_keepalive_timeout -syn keyword ngxDirective spdy_max_concurrent_streams -syn keyword ngxDirective spdy_pool_size -syn keyword ngxDirective spdy_recv_buffer_size -syn keyword ngxDirective spdy_recv_timeout -syn keyword ngxDirective spdy_streams_index_size -syn keyword ngxDirective ssi -syn keyword ngxDirective ssi_ignore_recycled_buffers -syn keyword ngxDirective ssi_last_modified -syn keyword ngxDirective ssi_min_file_chunk -syn keyword ngxDirective ssi_silent_errors -syn keyword ngxDirective ssi_types -syn keyword ngxDirective ssi_value_length -syn keyword ngxDirective ssl -syn keyword ngxDirective ssl_buffer_size -syn keyword ngxDirective ssl_certificate -syn keyword ngxDirective ssl_certificate_key -syn keyword ngxDirective ssl_ciphers -syn keyword ngxDirective ssl_client_certificate -syn keyword ngxDirective ssl_crl -syn keyword ngxDirective ssl_dhparam -syn keyword ngxDirective ssl_ecdh_curve -syn keyword ngxDirective ssl_engine -syn keyword ngxDirective ssl_handshake_timeout -syn keyword ngxDirective ssl_password_file -syn keyword ngxDirective ssl_prefer_server_ciphers -syn keyword ngxDirective ssl_preread -syn keyword ngxDirective ssl_protocols nextgroup=ngxSSLProtocol skipwhite -syn keyword ngxSSLProtocol SSLv2 SSLv3 TLSv1 TLSv1.1 TLSv1.2 contained nextgroup=ngxSSLProtocol skipwhite -syn keyword ngxDirective ssl_session_cache -syn keyword ngxDirective ssl_session_ticket_key -syn keyword ngxDirective ssl_session_tickets -syn keyword ngxDirective ssl_session_timeout -syn keyword ngxDirective ssl_stapling -syn keyword ngxDirective ssl_stapling_file -syn keyword ngxDirective ssl_stapling_responder -syn keyword ngxDirective ssl_stapling_verify -syn keyword ngxDirective ssl_trusted_certificate -syn keyword ngxDirective ssl_verify_client -syn keyword ngxDirective ssl_verify_depth -syn keyword ngxDirective starttls -syn keyword ngxDirective state -syn keyword ngxDirective status -syn keyword ngxDirective status_format -syn keyword ngxDirective status_zone -syn keyword ngxDirective sticky -syn keyword ngxDirective sticky_cookie_insert -syn keyword ngxDirective stub_status -syn keyword ngxDirective sub_filter -syn keyword ngxDirective sub_filter_last_modified -syn keyword ngxDirective sub_filter_once -syn keyword ngxDirective sub_filter_types -syn keyword ngxDirective tcp_nodelay -syn keyword ngxDirective tcp_nopush -syn keyword ngxDirective thread_pool -syn keyword ngxDirective thread_stack_size -syn keyword ngxDirective timeout -syn keyword ngxDirective timer_resolution -syn keyword ngxDirective types_hash_bucket_size -syn keyword ngxDirective types_hash_max_size -syn keyword ngxDirective underscores_in_headers -syn keyword ngxDirective uninitialized_variable_warn -syn keyword ngxDirective upstream_conf -syn keyword ngxDirective use -syn keyword ngxDirective user -syn keyword ngxDirective userid -syn keyword ngxDirective userid_domain -syn keyword ngxDirective userid_expires -syn keyword ngxDirective userid_mark -syn keyword ngxDirective userid_name -syn keyword ngxDirective userid_p3p -syn keyword ngxDirective userid_path -syn keyword ngxDirective userid_service -syn keyword ngxDirective uwsgi_bind -syn keyword ngxDirective uwsgi_buffer_size -syn keyword ngxDirective uwsgi_buffering -syn keyword ngxDirective uwsgi_buffers -syn keyword ngxDirective uwsgi_busy_buffers_size -syn keyword ngxDirective uwsgi_cache -syn keyword ngxDirective uwsgi_cache_bypass -syn keyword ngxDirective uwsgi_cache_key -syn keyword ngxDirective uwsgi_cache_lock -syn keyword ngxDirective uwsgi_cache_lock_age -syn keyword ngxDirective uwsgi_cache_lock_timeout -syn keyword ngxDirective uwsgi_cache_methods -syn keyword ngxDirective uwsgi_cache_min_uses -syn keyword ngxDirective uwsgi_cache_path -syn keyword ngxDirective uwsgi_cache_purge -syn keyword ngxDirective uwsgi_cache_revalidate -syn keyword ngxDirective uwsgi_cache_use_stale -syn keyword ngxDirective uwsgi_cache_valid -syn keyword ngxDirective uwsgi_connect_timeout -syn keyword ngxDirective uwsgi_force_ranges -syn keyword ngxDirective uwsgi_hide_header -syn keyword ngxDirective uwsgi_ignore_client_abort -syn keyword ngxDirective uwsgi_ignore_headers -syn keyword ngxDirective uwsgi_intercept_errors -syn keyword ngxDirective uwsgi_limit_rate -syn keyword ngxDirective uwsgi_max_temp_file_size -syn keyword ngxDirective uwsgi_modifier1 -syn keyword ngxDirective uwsgi_modifier2 -syn keyword ngxDirective uwsgi_next_upstream -syn keyword ngxDirective uwsgi_next_upstream_timeout -syn keyword ngxDirective uwsgi_next_upstream_tries -syn keyword ngxDirective uwsgi_no_cache -syn keyword ngxDirective uwsgi_param -syn keyword ngxDirective uwsgi_pass -syn keyword ngxDirective uwsgi_pass_header -syn keyword ngxDirective uwsgi_pass_request_body -syn keyword ngxDirective uwsgi_pass_request_headers -syn keyword ngxDirective uwsgi_read_timeout -syn keyword ngxDirective uwsgi_request_buffering -syn keyword ngxDirective uwsgi_send_timeout -syn keyword ngxDirective uwsgi_ssl_certificate -syn keyword ngxDirective uwsgi_ssl_certificate_key -syn keyword ngxDirective uwsgi_ssl_ciphers -syn keyword ngxDirective uwsgi_ssl_crl -syn keyword ngxDirective uwsgi_ssl_name -syn keyword ngxDirective uwsgi_ssl_password_file -syn keyword ngxDirective uwsgi_ssl_protocols nextgroup=ngxSSLProtocol skipwhite -syn keyword ngxDirective uwsgi_ssl_server_name -syn keyword ngxDirective uwsgi_ssl_session_reuse -syn keyword ngxDirective uwsgi_ssl_trusted_certificate -syn keyword ngxDirective uwsgi_ssl_verify -syn keyword ngxDirective uwsgi_ssl_verify_depth -syn keyword ngxDirective uwsgi_store -syn keyword ngxDirective uwsgi_store_access -syn keyword ngxDirective uwsgi_string -syn keyword ngxDirective uwsgi_temp_file_write_size -syn keyword ngxDirective uwsgi_temp_path -syn keyword ngxDirective valid_referers -syn keyword ngxDirective variables_hash_bucket_size -syn keyword ngxDirective variables_hash_max_size -syn keyword ngxDirective worker_aio_requests -syn keyword ngxDirective worker_connections -syn keyword ngxDirective worker_cpu_affinity -syn keyword ngxDirective worker_priority -syn keyword ngxDirective worker_processes -syn keyword ngxDirective worker_rlimit_core -syn keyword ngxDirective worker_rlimit_nofile -syn keyword ngxDirective worker_rlimit_sigpending -syn keyword ngxDirective worker_threads -syn keyword ngxDirective working_directory -syn keyword ngxDirective xclient -syn keyword ngxDirective xml_entities -syn keyword ngxDirective xslt_last_modified -syn keyword ngxDirective xslt_param -syn keyword ngxDirective xslt_string_param -syn keyword ngxDirective xslt_stylesheet -syn keyword ngxDirective xslt_types -syn keyword ngxDirective zone +syn match ngxVariable '\$\w\+' contained +syn match ngxVariableString '\$\(\w\+\|{\w\+}\)' contained + +syn cluster ngxTopLevel + \ contains=ngxName,ngxString,ngxComment +syn cluster ngxDirectives + \ contains=ngxDirective,ngxDirectiveBlock,ngxDirectiveImportant + \ add=ngxDirectiveControl,ngxDirectiveError,ngxDirectiveDeprecated + \ add=ngxDirectiveThirdParty +syn cluster ngxParams + \ contains=ngxParam,ngxString,ngxParamComment,ngxSemicolon,ngxBlock + \ add=ngxBoolean + +syn keyword ngxDirectiveBlock contained http +syn keyword ngxDirectiveBlock contained mail +syn keyword ngxDirectiveBlock contained events +syn keyword ngxDirectiveBlock contained server +syn keyword ngxDirectiveBlock contained types +syn keyword ngxDirectiveBlock contained location +syn keyword ngxDirectiveBlock contained upstream +syn keyword ngxDirectiveBlock contained charset_map +syn keyword ngxDirectiveBlock contained limit_except +syn keyword ngxDirectiveBlock contained if +syn keyword ngxDirectiveBlock contained geo +syn keyword ngxDirectiveBlock contained map +syn keyword ngxDirectiveBlock contained split_clients + +syn keyword ngxDirectiveImportant contained include +syn keyword ngxDirectiveImportant contained root +"syn keyword ngxDirectiveImportant contained server +syn keyword ngxDirectiveImportant contained server_name +"syn keyword ngxDirectiveImportant contained listen +syn keyword ngxDirectiveImportant contained internal +syn keyword ngxDirectiveImportant contained proxy_pass +syn keyword ngxDirectiveImportant contained memcached_pass +syn keyword ngxDirectiveImportant contained fastcgi_pass +syn keyword ngxDirectiveImportant contained scgi_pass +syn keyword ngxDirectiveImportant contained uwsgi_pass +syn keyword ngxDirectiveImportant contained try_files + +syn cluster ngxTopLevel add=ngxDirectiveImportantListen +syn keyword ngxDirectiveImportantListen listen + \ nextgroup=@ngxListenParams skipwhite skipempty +syn match ngxListenParam '\([^;{ \t\\]\|\\.\)\+' + \ contained + \ nextgroup=@ngxListenParams skipwhite skipempty +syn region ngxListenString start=+\z(["']\)+ end=+\z1+ skip=+\\\\\|\\\z1+ + \ contained + \ nextgroup=@ngxListenParams skipwhite skipempty +syn match ngxListenComment '#.*$' + \ contained + \ nextgroup=@ngxListenParams skipwhite skipempty +syn keyword ngxListenOptions contained + \ default_server ssl http2 spdy proxy_protocol + \ setfib fastopen backlog rcvbuf sndbuf accept_filter deferred bind + \ ipv6only reuseport so_keepalive keepidle + \ nextgroup=@ngxListenParams skipwhite skipempty +syn cluster ngxListenParams + \ contains=ngxListenParam,ngxListenString,ngxListenComment + \ add=ngxListenOptions + +syn keyword ngxDirectiveControl contained break +syn keyword ngxDirectiveControl contained return +syn keyword ngxDirectiveControl contained rewrite +syn keyword ngxDirectiveControl contained set + +syn keyword ngxDirectiveError contained error_page +syn keyword ngxDirectiveError contained post_action + +syn keyword ngxDirectiveDeprecated contained connections +syn keyword ngxDirectiveDeprecated contained imap +syn keyword ngxDirectiveDeprecated contained limit_zone +syn keyword ngxDirectiveDeprecated contained mysql_test +syn keyword ngxDirectiveDeprecated contained open_file_cache_retest +syn keyword ngxDirectiveDeprecated contained optimize_server_names +syn keyword ngxDirectiveDeprecated contained satisfy_any +syn keyword ngxDirectiveDeprecated contained so_keepalive + +syn keyword ngxDirective contained absolute_redirect +syn keyword ngxDirective contained accept_mutex +syn keyword ngxDirective contained accept_mutex_delay +syn keyword ngxDirective contained acceptex_read +syn keyword ngxDirective contained access_log +syn keyword ngxDirective contained add_after_body +syn keyword ngxDirective contained add_before_body +syn keyword ngxDirective contained add_header +syn keyword ngxDirective contained addition_types +syn keyword ngxDirective contained aio +syn keyword ngxDirective contained aio_write +syn keyword ngxDirective contained alias +syn keyword ngxDirective contained allow +syn keyword ngxDirective contained ancient_browser +syn keyword ngxDirective contained ancient_browser_value +syn keyword ngxDirective contained auth_basic +syn keyword ngxDirective contained auth_basic_user_file +syn keyword ngxDirective contained auth_http +syn keyword ngxDirective contained auth_http_header +syn keyword ngxDirective contained auth_http_pass_client_cert +syn keyword ngxDirective contained auth_http_timeout +syn keyword ngxDirective contained auth_jwt +syn keyword ngxDirective contained auth_jwt_key_file +syn keyword ngxDirective contained auth_request +syn keyword ngxDirective contained auth_request_set +syn keyword ngxDirective contained autoindex +syn keyword ngxDirective contained autoindex_exact_size +syn keyword ngxDirective contained autoindex_format +syn keyword ngxDirective contained autoindex_localtime +syn keyword ngxDirective contained charset +syn keyword ngxDirective contained charset_map +syn keyword ngxDirective contained charset_types +syn keyword ngxDirective contained chunked_transfer_encoding +syn keyword ngxDirective contained client_body_buffer_size +syn keyword ngxDirective contained client_body_in_file_only +syn keyword ngxDirective contained client_body_in_single_buffer +syn keyword ngxDirective contained client_body_temp_path +syn keyword ngxDirective contained client_body_timeout +syn keyword ngxDirective contained client_header_buffer_size +syn keyword ngxDirective contained client_header_timeout +syn keyword ngxDirective contained client_max_body_size +syn keyword ngxDirective contained connection_pool_size +syn keyword ngxDirective contained create_full_put_path +syn keyword ngxDirective contained daemon +syn keyword ngxDirective contained dav_access +syn keyword ngxDirective contained dav_methods +syn keyword ngxDirective contained debug_connection +syn keyword ngxDirective contained debug_points +syn keyword ngxDirective contained default_type +syn keyword ngxDirective contained degradation +syn keyword ngxDirective contained degrade +syn keyword ngxDirective contained deny +syn keyword ngxDirective contained devpoll_changes +syn keyword ngxDirective contained devpoll_events +syn keyword ngxDirective contained directio +syn keyword ngxDirective contained directio_alignment +syn keyword ngxDirective contained disable_symlinks +syn keyword ngxDirective contained empty_gif +syn keyword ngxDirective contained env +syn keyword ngxDirective contained epoll_events +syn keyword ngxDirective contained error_log +syn keyword ngxDirective contained etag +syn keyword ngxDirective contained eventport_events +syn keyword ngxDirective contained expires +syn keyword ngxDirective contained f4f +syn keyword ngxDirective contained f4f_buffer_size +syn keyword ngxDirective contained fastcgi_bind +syn keyword ngxDirective contained fastcgi_buffer_size +syn keyword ngxDirective contained fastcgi_buffering +syn keyword ngxDirective contained fastcgi_buffers +syn keyword ngxDirective contained fastcgi_busy_buffers_size +syn keyword ngxDirective contained fastcgi_cache +syn keyword ngxDirective contained fastcgi_cache_bypass +syn keyword ngxDirective contained fastcgi_cache_key +syn keyword ngxDirective contained fastcgi_cache_lock +syn keyword ngxDirective contained fastcgi_cache_lock_age +syn keyword ngxDirective contained fastcgi_cache_lock_timeout +syn keyword ngxDirective contained fastcgi_cache_max_range_offset +syn keyword ngxDirective contained fastcgi_cache_methods +syn keyword ngxDirective contained fastcgi_cache_min_uses +syn keyword ngxDirective contained fastcgi_cache_path +syn keyword ngxDirective contained fastcgi_cache_purge +syn keyword ngxDirective contained fastcgi_cache_revalidate +syn keyword ngxDirective contained fastcgi_cache_use_stale +syn keyword ngxDirective contained fastcgi_cache_valid +syn keyword ngxDirective contained fastcgi_catch_stderr +syn keyword ngxDirective contained fastcgi_connect_timeout +syn keyword ngxDirective contained fastcgi_force_ranges +syn keyword ngxDirective contained fastcgi_hide_header +syn keyword ngxDirective contained fastcgi_ignore_client_abort +syn keyword ngxDirective contained fastcgi_ignore_headers +syn keyword ngxDirective contained fastcgi_index +syn keyword ngxDirective contained fastcgi_intercept_errors +syn keyword ngxDirective contained fastcgi_keep_conn +syn keyword ngxDirective contained fastcgi_limit_rate +syn keyword ngxDirective contained fastcgi_max_temp_file_size +syn keyword ngxDirective contained fastcgi_next_upstream +syn keyword ngxDirective contained fastcgi_next_upstream_timeout +syn keyword ngxDirective contained fastcgi_next_upstream_tries +syn keyword ngxDirective contained fastcgi_no_cache +syn keyword ngxDirective contained fastcgi_param +syn keyword ngxDirective contained fastcgi_pass_header +syn keyword ngxDirective contained fastcgi_pass_request_body +syn keyword ngxDirective contained fastcgi_pass_request_headers +syn keyword ngxDirective contained fastcgi_read_timeout +syn keyword ngxDirective contained fastcgi_request_buffering +syn keyword ngxDirective contained fastcgi_send_lowat +syn keyword ngxDirective contained fastcgi_send_timeout +syn keyword ngxDirective contained fastcgi_split_path_info +syn keyword ngxDirective contained fastcgi_store +syn keyword ngxDirective contained fastcgi_store_access +syn keyword ngxDirective contained fastcgi_temp_file_write_size +syn keyword ngxDirective contained fastcgi_temp_path +syn keyword ngxDirective contained flv +syn keyword ngxDirective contained geoip_city +syn keyword ngxDirective contained geoip_country +syn keyword ngxDirective contained geoip_org +syn keyword ngxDirective contained geoip_proxy +syn keyword ngxDirective contained geoip_proxy_recursive +syn keyword ngxDirective contained google_perftools_profiles +syn keyword ngxDirective contained gunzip +syn keyword ngxDirective contained gunzip_buffers +syn keyword ngxDirective contained gzip +syn keyword ngxDirective contained gzip_buffers +syn keyword ngxDirective contained gzip_comp_level +syn keyword ngxDirective contained gzip_disable +syn keyword ngxDirective contained gzip_hash +syn keyword ngxDirective contained gzip_http_version +syn keyword ngxDirective contained gzip_min_length +syn keyword ngxDirective contained gzip_no_buffer +syn keyword ngxDirective contained gzip_proxied +syn keyword ngxDirective contained gzip_static +syn keyword ngxDirective contained gzip_types +syn keyword ngxDirective contained gzip_vary +syn keyword ngxDirective contained gzip_window +syn keyword ngxDirective contained hash +syn keyword ngxDirective contained health_check +syn keyword ngxDirective contained health_check_timeout +syn keyword ngxDirective contained hls +syn keyword ngxDirective contained hls_buffers +syn keyword ngxDirective contained hls_forward_args +syn keyword ngxDirective contained hls_fragment +syn keyword ngxDirective contained hls_mp4_buffer_size +syn keyword ngxDirective contained hls_mp4_max_buffer_size +syn keyword ngxDirective contained http2_chunk_size +syn keyword ngxDirective contained http2_body_preread_size +syn keyword ngxDirective contained http2_idle_timeout +syn keyword ngxDirective contained http2_max_concurrent_streams +syn keyword ngxDirective contained http2_max_field_size +syn keyword ngxDirective contained http2_max_header_size +syn keyword ngxDirective contained http2_max_requests +syn keyword ngxDirective contained http2_recv_buffer_size +syn keyword ngxDirective contained http2_recv_timeout +syn keyword ngxDirective contained if_modified_since +syn keyword ngxDirective contained ignore_invalid_headers +syn keyword ngxDirective contained image_filter +syn keyword ngxDirective contained image_filter_buffer +syn keyword ngxDirective contained image_filter_interlace +syn keyword ngxDirective contained image_filter_jpeg_quality +syn keyword ngxDirective contained image_filter_sharpen +syn keyword ngxDirective contained image_filter_transparency +syn keyword ngxDirective contained image_filter_webp_quality +syn keyword ngxDirective contained imap_auth +syn keyword ngxDirective contained imap_capabilities +syn keyword ngxDirective contained imap_client_buffer +syn keyword ngxDirective contained index +syn keyword ngxDirective contained iocp_threads +syn keyword ngxDirective contained ip_hash +syn keyword ngxDirective contained js_access +syn keyword ngxDirective contained js_content +syn keyword ngxDirective contained js_filter +syn keyword ngxDirective contained js_include +syn keyword ngxDirective contained js_preread +syn keyword ngxDirective contained js_set +syn keyword ngxDirective contained keepalive +syn keyword ngxDirective contained keepalive_disable +syn keyword ngxDirective contained keepalive_requests +syn keyword ngxDirective contained keepalive_timeout +syn keyword ngxDirective contained kqueue_changes +syn keyword ngxDirective contained kqueue_events +syn keyword ngxDirective contained large_client_header_buffers +syn keyword ngxDirective contained least_conn +syn keyword ngxDirective contained least_time +syn keyword ngxDirective contained limit_conn +syn keyword ngxDirective contained limit_conn_log_level +syn keyword ngxDirective contained limit_conn_status +syn keyword ngxDirective contained limit_conn_zone +syn keyword ngxDirective contained limit_rate +syn keyword ngxDirective contained limit_rate_after +syn keyword ngxDirective contained limit_req +syn keyword ngxDirective contained limit_req_log_level +syn keyword ngxDirective contained limit_req_status +syn keyword ngxDirective contained limit_req_zone +syn keyword ngxDirective contained lingering_close +syn keyword ngxDirective contained lingering_time +syn keyword ngxDirective contained lingering_timeout +syn keyword ngxDirective contained load_module +syn keyword ngxDirective contained lock_file +syn keyword ngxDirective contained log_format +syn keyword ngxDirective contained log_not_found +syn keyword ngxDirective contained log_subrequest +syn keyword ngxDirective contained map_hash_bucket_size +syn keyword ngxDirective contained map_hash_max_size +syn keyword ngxDirective contained match +syn keyword ngxDirective contained master_process +syn keyword ngxDirective contained max_ranges +syn keyword ngxDirective contained memcached_bind +syn keyword ngxDirective contained memcached_buffer_size +syn keyword ngxDirective contained memcached_connect_timeout +syn keyword ngxDirective contained memcached_force_ranges +syn keyword ngxDirective contained memcached_gzip_flag +syn keyword ngxDirective contained memcached_next_upstream +syn keyword ngxDirective contained memcached_next_upstream_timeout +syn keyword ngxDirective contained memcached_next_upstream_tries +syn keyword ngxDirective contained memcached_read_timeout +syn keyword ngxDirective contained memcached_send_timeout +syn keyword ngxDirective contained merge_slashes +syn keyword ngxDirective contained min_delete_depth +syn keyword ngxDirective contained modern_browser +syn keyword ngxDirective contained modern_browser_value +syn keyword ngxDirective contained mp4 +syn keyword ngxDirective contained mp4_buffer_size +syn keyword ngxDirective contained mp4_max_buffer_size +syn keyword ngxDirective contained mp4_limit_rate +syn keyword ngxDirective contained mp4_limit_rate_after +syn keyword ngxDirective contained msie_padding +syn keyword ngxDirective contained msie_refresh +syn keyword ngxDirective contained multi_accept +syn keyword ngxDirective contained ntlm +syn keyword ngxDirective contained open_file_cache +syn keyword ngxDirective contained open_file_cache_errors +syn keyword ngxDirective contained open_file_cache_events +syn keyword ngxDirective contained open_file_cache_min_uses +syn keyword ngxDirective contained open_file_cache_valid +syn keyword ngxDirective contained open_log_file_cache +syn keyword ngxDirective contained output_buffers +syn keyword ngxDirective contained override_charset +syn keyword ngxDirective contained pcre_jit +syn keyword ngxDirective contained perl +syn keyword ngxDirective contained perl_modules +syn keyword ngxDirective contained perl_require +syn keyword ngxDirective contained perl_set +syn keyword ngxDirective contained pid +syn keyword ngxDirective contained pop3_auth +syn keyword ngxDirective contained pop3_capabilities +syn keyword ngxDirective contained port_in_redirect +syn keyword ngxDirective contained post_acceptex +syn keyword ngxDirective contained postpone_gzipping +syn keyword ngxDirective contained postpone_output +syn keyword ngxDirective contained preread_buffer_size +syn keyword ngxDirective contained preread_timeout +syn keyword ngxDirective contained protocol +"syn keyword ngxDirective contained protocol nextgroup=ngxMailProtocol skipwhite +"syn keyword ngxMailProtocol imap pop3 smtp contained +syn keyword ngxDirective contained proxy +syn keyword ngxDirective contained proxy_bind +syn keyword ngxDirective contained proxy_buffer +syn keyword ngxDirective contained proxy_buffer_size +syn keyword ngxDirective contained proxy_buffering +syn keyword ngxDirective contained proxy_buffers +syn keyword ngxDirective contained proxy_busy_buffers_size +syn keyword ngxDirective contained proxy_cache +syn keyword ngxDirective contained proxy_cache_bypass +syn keyword ngxDirective contained proxy_cache_convert_head +syn keyword ngxDirective contained proxy_cache_key +syn keyword ngxDirective contained proxy_cache_lock +syn keyword ngxDirective contained proxy_cache_lock_age +syn keyword ngxDirective contained proxy_cache_lock_timeout +syn keyword ngxDirective contained proxy_cache_max_range_offset +syn keyword ngxDirective contained proxy_cache_methods +syn keyword ngxDirective contained proxy_cache_min_uses +syn keyword ngxDirective contained proxy_cache_path +syn keyword ngxDirective contained proxy_cache_purge +syn keyword ngxDirective contained proxy_cache_revalidate +syn keyword ngxDirective contained proxy_cache_use_stale +syn keyword ngxDirective contained proxy_cache_valid +syn keyword ngxDirective contained proxy_connect_timeout +syn keyword ngxDirective contained proxy_cookie_domain +syn keyword ngxDirective contained proxy_cookie_path +syn keyword ngxDirective contained proxy_download_rate +syn keyword ngxDirective contained proxy_force_ranges +syn keyword ngxDirective contained proxy_headers_hash_bucket_size +syn keyword ngxDirective contained proxy_headers_hash_max_size +syn keyword ngxDirective contained proxy_hide_header +syn keyword ngxDirective contained proxy_http_version +syn keyword ngxDirective contained proxy_ignore_client_abort +syn keyword ngxDirective contained proxy_ignore_headers +syn keyword ngxDirective contained proxy_intercept_errors +syn keyword ngxDirective contained proxy_limit_rate +syn keyword ngxDirective contained proxy_max_temp_file_size +syn keyword ngxDirective contained proxy_method +syn keyword ngxDirective contained proxy_next_upstream +syn keyword ngxDirective contained proxy_next_upstream_timeout +syn keyword ngxDirective contained proxy_next_upstream_tries +syn keyword ngxDirective contained proxy_no_cache +syn keyword ngxDirective contained proxy_pass_error_message +syn keyword ngxDirective contained proxy_pass_header +syn keyword ngxDirective contained proxy_pass_request_body +syn keyword ngxDirective contained proxy_pass_request_headers +syn keyword ngxDirective contained proxy_protocol +syn keyword ngxDirective contained proxy_protocol_timeout +syn keyword ngxDirective contained proxy_read_timeout +syn keyword ngxDirective contained proxy_redirect +syn keyword ngxDirective contained proxy_request_buffering +syn keyword ngxDirective contained proxy_responses +syn keyword ngxDirective contained proxy_send_lowat +syn keyword ngxDirective contained proxy_send_timeout +syn keyword ngxDirective contained proxy_set_body +syn keyword ngxDirective contained proxy_set_header +syn keyword ngxDirective contained proxy_ssl_certificate +syn keyword ngxDirective contained proxy_ssl_certificate_key +syn keyword ngxDirective contained proxy_ssl_ciphers +syn keyword ngxDirective contained proxy_ssl_crl +syn keyword ngxDirective contained proxy_ssl_name +syn keyword ngxDirective contained proxy_ssl_password_file +syn keyword ngxDirective contained proxy_ssl_protocols +"syn keyword ngxDirective contained proxy_ssl_protocols nextgroup=ngxSSLProtocol skipwhite +syn keyword ngxDirective contained proxy_ssl_server_name +syn keyword ngxDirective contained proxy_ssl_session_reuse +syn keyword ngxDirective contained proxy_ssl_trusted_certificate +syn keyword ngxDirective contained proxy_ssl_verify +syn keyword ngxDirective contained proxy_ssl_verify_depth +syn keyword ngxDirective contained proxy_store +syn keyword ngxDirective contained proxy_store_access +syn keyword ngxDirective contained proxy_temp_file_write_size +syn keyword ngxDirective contained proxy_temp_path +syn keyword ngxDirective contained proxy_timeout +syn keyword ngxDirective contained proxy_upload_rate +syn keyword ngxDirective contained queue +syn keyword ngxDirective contained random_index +syn keyword ngxDirective contained read_ahead +syn keyword ngxDirective contained real_ip_header +syn keyword ngxDirective contained real_ip_recursive +syn keyword ngxDirective contained recursive_error_pages +syn keyword ngxDirective contained referer_hash_bucket_size +syn keyword ngxDirective contained referer_hash_max_size +syn keyword ngxDirective contained request_pool_size +syn keyword ngxDirective contained reset_timedout_connection +syn keyword ngxDirective contained resolver +syn keyword ngxDirective contained resolver_timeout +syn keyword ngxDirective contained rewrite_log +syn keyword ngxDirective contained rtsig_overflow_events +syn keyword ngxDirective contained rtsig_overflow_test +syn keyword ngxDirective contained rtsig_overflow_threshold +syn keyword ngxDirective contained rtsig_signo +syn keyword ngxDirective contained satisfy +syn keyword ngxDirective contained scgi_bind +syn keyword ngxDirective contained scgi_buffer_size +syn keyword ngxDirective contained scgi_buffering +syn keyword ngxDirective contained scgi_buffers +syn keyword ngxDirective contained scgi_busy_buffers_size +syn keyword ngxDirective contained scgi_cache +syn keyword ngxDirective contained scgi_cache_bypass +syn keyword ngxDirective contained scgi_cache_key +syn keyword ngxDirective contained scgi_cache_lock +syn keyword ngxDirective contained scgi_cache_lock_age +syn keyword ngxDirective contained scgi_cache_lock_timeout +syn keyword ngxDirective contained scgi_cache_max_range_offset +syn keyword ngxDirective contained scgi_cache_methods +syn keyword ngxDirective contained scgi_cache_min_uses +syn keyword ngxDirective contained scgi_cache_path +syn keyword ngxDirective contained scgi_cache_purge +syn keyword ngxDirective contained scgi_cache_revalidate +syn keyword ngxDirective contained scgi_cache_use_stale +syn keyword ngxDirective contained scgi_cache_valid +syn keyword ngxDirective contained scgi_connect_timeout +syn keyword ngxDirective contained scgi_force_ranges +syn keyword ngxDirective contained scgi_hide_header +syn keyword ngxDirective contained scgi_ignore_client_abort +syn keyword ngxDirective contained scgi_ignore_headers +syn keyword ngxDirective contained scgi_intercept_errors +syn keyword ngxDirective contained scgi_limit_rate +syn keyword ngxDirective contained scgi_max_temp_file_size +syn keyword ngxDirective contained scgi_next_upstream +syn keyword ngxDirective contained scgi_next_upstream_timeout +syn keyword ngxDirective contained scgi_next_upstream_tries +syn keyword ngxDirective contained scgi_no_cache +syn keyword ngxDirective contained scgi_param +syn keyword ngxDirective contained scgi_pass_header +syn keyword ngxDirective contained scgi_pass_request_body +syn keyword ngxDirective contained scgi_pass_request_headers +syn keyword ngxDirective contained scgi_read_timeout +syn keyword ngxDirective contained scgi_request_buffering +syn keyword ngxDirective contained scgi_send_timeout +syn keyword ngxDirective contained scgi_store +syn keyword ngxDirective contained scgi_store_access +syn keyword ngxDirective contained scgi_temp_file_write_size +syn keyword ngxDirective contained scgi_temp_path +syn keyword ngxDirective contained secure_link +syn keyword ngxDirective contained secure_link_md5 +syn keyword ngxDirective contained secure_link_secret +syn keyword ngxDirective contained send_lowat +syn keyword ngxDirective contained send_timeout +syn keyword ngxDirective contained sendfile +syn keyword ngxDirective contained sendfile_max_chunk +syn keyword ngxDirective contained server_name_in_redirect +syn keyword ngxDirective contained server_names_hash_bucket_size +syn keyword ngxDirective contained server_names_hash_max_size +syn keyword ngxDirective contained server_tokens +syn keyword ngxDirective contained session_log +syn keyword ngxDirective contained session_log_format +syn keyword ngxDirective contained session_log_zone +syn keyword ngxDirective contained set_real_ip_from +syn keyword ngxDirective contained slice +syn keyword ngxDirective contained smtp_auth +syn keyword ngxDirective contained smtp_capabilities +syn keyword ngxDirective contained smtp_client_buffer +syn keyword ngxDirective contained smtp_greeting_delay +syn keyword ngxDirective contained source_charset +syn keyword ngxDirective contained spdy_chunk_size +syn keyword ngxDirective contained spdy_headers_comp +syn keyword ngxDirective contained spdy_keepalive_timeout +syn keyword ngxDirective contained spdy_max_concurrent_streams +syn keyword ngxDirective contained spdy_pool_size +syn keyword ngxDirective contained spdy_recv_buffer_size +syn keyword ngxDirective contained spdy_recv_timeout +syn keyword ngxDirective contained spdy_streams_index_size +syn keyword ngxDirective contained ssi +syn keyword ngxDirective contained ssi_ignore_recycled_buffers +syn keyword ngxDirective contained ssi_last_modified +syn keyword ngxDirective contained ssi_min_file_chunk +syn keyword ngxDirective contained ssi_silent_errors +syn keyword ngxDirective contained ssi_types +syn keyword ngxDirective contained ssi_value_length +syn keyword ngxDirective contained ssl +syn keyword ngxDirective contained ssl_buffer_size +syn keyword ngxDirective contained ssl_certificate +syn keyword ngxDirective contained ssl_certificate_key +syn keyword ngxDirective contained ssl_ciphers +syn keyword ngxDirective contained ssl_client_certificate +syn keyword ngxDirective contained ssl_crl +syn keyword ngxDirective contained ssl_dhparam +syn keyword ngxDirective contained ssl_ecdh_curve +syn keyword ngxDirective contained ssl_engine +syn keyword ngxDirective contained ssl_handshake_timeout +syn keyword ngxDirective contained ssl_password_file +syn keyword ngxDirective contained ssl_prefer_server_ciphers +syn keyword ngxDirective contained ssl_preread +syn keyword ngxDirective contained ssl_protocols +"syn keyword ngxDirective contained ssl_protocols nextgroup=ngxSSLProtocol skipwhite +"syn keyword ngxSSLProtocol SSLv2 SSLv3 TLSv1 TLSv1.1 TLSv1.2 contained nextgroup=ngxSSLProtocol skipwhite +syn keyword ngxDirective contained ssl_session_cache +syn keyword ngxDirective contained ssl_session_ticket_key +syn keyword ngxDirective contained ssl_session_tickets +syn keyword ngxDirective contained ssl_session_timeout +syn keyword ngxDirective contained ssl_stapling +syn keyword ngxDirective contained ssl_stapling_file +syn keyword ngxDirective contained ssl_stapling_responder +syn keyword ngxDirective contained ssl_stapling_verify +syn keyword ngxDirective contained ssl_trusted_certificate +syn keyword ngxDirective contained ssl_verify_client +syn keyword ngxDirective contained ssl_verify_depth +syn keyword ngxDirective contained starttls +syn keyword ngxDirective contained state +syn keyword ngxDirective contained status +syn keyword ngxDirective contained status_format +syn keyword ngxDirective contained status_zone +syn keyword ngxDirective contained sticky +syn keyword ngxDirective contained sticky_cookie_insert +syn keyword ngxDirective contained stub_status +syn keyword ngxDirective contained sub_filter +syn keyword ngxDirective contained sub_filter_last_modified +syn keyword ngxDirective contained sub_filter_once +syn keyword ngxDirective contained sub_filter_types +syn keyword ngxDirective contained tcp_nodelay +syn keyword ngxDirective contained tcp_nopush +syn keyword ngxDirective contained thread_pool +syn keyword ngxDirective contained thread_stack_size +syn keyword ngxDirective contained timeout +syn keyword ngxDirective contained timer_resolution +syn keyword ngxDirective contained types_hash_bucket_size +syn keyword ngxDirective contained types_hash_max_size +syn keyword ngxDirective contained underscores_in_headers +syn keyword ngxDirective contained uninitialized_variable_warn +syn keyword ngxDirective contained upstream_conf +syn keyword ngxDirective contained use +syn keyword ngxDirective contained user +syn keyword ngxDirective contained userid +syn keyword ngxDirective contained userid_domain +syn keyword ngxDirective contained userid_expires +syn keyword ngxDirective contained userid_mark +syn keyword ngxDirective contained userid_name +syn keyword ngxDirective contained userid_p3p +syn keyword ngxDirective contained userid_path +syn keyword ngxDirective contained userid_service +syn keyword ngxDirective contained uwsgi_bind +syn keyword ngxDirective contained uwsgi_buffer_size +syn keyword ngxDirective contained uwsgi_buffering +syn keyword ngxDirective contained uwsgi_buffers +syn keyword ngxDirective contained uwsgi_busy_buffers_size +syn keyword ngxDirective contained uwsgi_cache +syn keyword ngxDirective contained uwsgi_cache_bypass +syn keyword ngxDirective contained uwsgi_cache_key +syn keyword ngxDirective contained uwsgi_cache_lock +syn keyword ngxDirective contained uwsgi_cache_lock_age +syn keyword ngxDirective contained uwsgi_cache_lock_timeout +syn keyword ngxDirective contained uwsgi_cache_methods +syn keyword ngxDirective contained uwsgi_cache_min_uses +syn keyword ngxDirective contained uwsgi_cache_path +syn keyword ngxDirective contained uwsgi_cache_purge +syn keyword ngxDirective contained uwsgi_cache_revalidate +syn keyword ngxDirective contained uwsgi_cache_use_stale +syn keyword ngxDirective contained uwsgi_cache_valid +syn keyword ngxDirective contained uwsgi_connect_timeout +syn keyword ngxDirective contained uwsgi_force_ranges +syn keyword ngxDirective contained uwsgi_hide_header +syn keyword ngxDirective contained uwsgi_ignore_client_abort +syn keyword ngxDirective contained uwsgi_ignore_headers +syn keyword ngxDirective contained uwsgi_intercept_errors +syn keyword ngxDirective contained uwsgi_limit_rate +syn keyword ngxDirective contained uwsgi_max_temp_file_size +syn keyword ngxDirective contained uwsgi_modifier1 +syn keyword ngxDirective contained uwsgi_modifier2 +syn keyword ngxDirective contained uwsgi_next_upstream +syn keyword ngxDirective contained uwsgi_next_upstream_timeout +syn keyword ngxDirective contained uwsgi_next_upstream_tries +syn keyword ngxDirective contained uwsgi_no_cache +syn keyword ngxDirective contained uwsgi_param +syn keyword ngxDirective contained uwsgi_pass +syn keyword ngxDirective contained uwsgi_pass_header +syn keyword ngxDirective contained uwsgi_pass_request_body +syn keyword ngxDirective contained uwsgi_pass_request_headers +syn keyword ngxDirective contained uwsgi_read_timeout +syn keyword ngxDirective contained uwsgi_request_buffering +syn keyword ngxDirective contained uwsgi_send_timeout +syn keyword ngxDirective contained uwsgi_ssl_certificate +syn keyword ngxDirective contained uwsgi_ssl_certificate_key +syn keyword ngxDirective contained uwsgi_ssl_ciphers +syn keyword ngxDirective contained uwsgi_ssl_crl +syn keyword ngxDirective contained uwsgi_ssl_name +syn keyword ngxDirective contained uwsgi_ssl_password_file +"syn keyword ngxDirective contained uwsgi_ssl_protocols nextgroup=ngxSSLProtocol skipwhite +syn keyword ngxDirective contained uwsgi_ssl_protocols +syn keyword ngxDirective contained uwsgi_ssl_server_name +syn keyword ngxDirective contained uwsgi_ssl_session_reuse +syn keyword ngxDirective contained uwsgi_ssl_trusted_certificate +syn keyword ngxDirective contained uwsgi_ssl_verify +syn keyword ngxDirective contained uwsgi_ssl_verify_depth +syn keyword ngxDirective contained uwsgi_store +syn keyword ngxDirective contained uwsgi_store_access +syn keyword ngxDirective contained uwsgi_string +syn keyword ngxDirective contained uwsgi_temp_file_write_size +syn keyword ngxDirective contained uwsgi_temp_path +syn keyword ngxDirective contained valid_referers +syn keyword ngxDirective contained variables_hash_bucket_size +syn keyword ngxDirective contained variables_hash_max_size +syn keyword ngxDirective contained worker_aio_requests +syn keyword ngxDirective contained worker_connections +syn keyword ngxDirective contained worker_cpu_affinity +syn keyword ngxDirective contained worker_priority +syn keyword ngxDirective contained worker_processes +syn keyword ngxDirective contained worker_rlimit_core +syn keyword ngxDirective contained worker_rlimit_nofile +syn keyword ngxDirective contained worker_rlimit_sigpending +syn keyword ngxDirective contained worker_threads +syn keyword ngxDirective contained working_directory +syn keyword ngxDirective contained xclient +syn keyword ngxDirective contained xml_entities +syn keyword ngxDirective contained xslt_last_modified +syn keyword ngxDirective contained xslt_param +syn keyword ngxDirective contained xslt_string_param +syn keyword ngxDirective contained xslt_stylesheet +syn keyword ngxDirective contained xslt_types +syn keyword ngxDirective contained zone " 3rd party module list: " https://www.nginx.com/resources/wiki/modules/ " Accept Language Module " Parses the Accept-Language header and gives the most suitable locale from a list of supported locales. -syn keyword ngxDirectiveThirdParty set_from_accept_language +syn keyword ngxDirectiveThirdParty contained set_from_accept_language " Access Key Module (DEPRECATED) " Denies access unless the request URL contains an access key. -syn keyword ngxDirectiveDeprecated accesskey -syn keyword ngxDirectiveDeprecated accesskey_arg -syn keyword ngxDirectiveDeprecated accesskey_hashmethod -syn keyword ngxDirectiveDeprecated accesskey_signature +syn keyword ngxDirectiveDeprecated contained accesskey +syn keyword ngxDirectiveDeprecated contained accesskey_arg +syn keyword ngxDirectiveDeprecated contained accesskey_hashmethod +syn keyword ngxDirectiveDeprecated contained accesskey_signature " Asynchronous FastCGI Module " Primarily a modified version of the Nginx FastCGI module which implements multiplexing of connections, allowing a single FastCGI server to handle many concurrent requests. -" syn keyword ngxDirectiveThirdParty fastcgi_bind -" syn keyword ngxDirectiveThirdParty fastcgi_buffer_size -" syn keyword ngxDirectiveThirdParty fastcgi_buffers -" syn keyword ngxDirectiveThirdParty fastcgi_busy_buffers_size -" syn keyword ngxDirectiveThirdParty fastcgi_cache -" syn keyword ngxDirectiveThirdParty fastcgi_cache_key -" syn keyword ngxDirectiveThirdParty fastcgi_cache_methods -" syn keyword ngxDirectiveThirdParty fastcgi_cache_min_uses -" syn keyword ngxDirectiveThirdParty fastcgi_cache_path -" syn keyword ngxDirectiveThirdParty fastcgi_cache_use_stale -" syn keyword ngxDirectiveThirdParty fastcgi_cache_valid -" syn keyword ngxDirectiveThirdParty fastcgi_catch_stderr -" syn keyword ngxDirectiveThirdParty fastcgi_connect_timeout -" syn keyword ngxDirectiveThirdParty fastcgi_hide_header -" syn keyword ngxDirectiveThirdParty fastcgi_ignore_client_abort -" syn keyword ngxDirectiveThirdParty fastcgi_ignore_headers -" syn keyword ngxDirectiveThirdParty fastcgi_index -" syn keyword ngxDirectiveThirdParty fastcgi_intercept_errors -" syn keyword ngxDirectiveThirdParty fastcgi_max_temp_file_size -" syn keyword ngxDirectiveThirdParty fastcgi_next_upstream -" syn keyword ngxDirectiveThirdParty fastcgi_param -" syn keyword ngxDirectiveThirdParty fastcgi_pass -" syn keyword ngxDirectiveThirdParty fastcgi_pass_header -" syn keyword ngxDirectiveThirdParty fastcgi_pass_request_body -" syn keyword ngxDirectiveThirdParty fastcgi_pass_request_headers -" syn keyword ngxDirectiveThirdParty fastcgi_read_timeout -" syn keyword ngxDirectiveThirdParty fastcgi_send_lowat -" syn keyword ngxDirectiveThirdParty fastcgi_send_timeout -" syn keyword ngxDirectiveThirdParty fastcgi_split_path_info -" syn keyword ngxDirectiveThirdParty fastcgi_store -" syn keyword ngxDirectiveThirdParty fastcgi_store_access -" syn keyword ngxDirectiveThirdParty fastcgi_temp_file_write_size -" syn keyword ngxDirectiveThirdParty fastcgi_temp_path -syn keyword ngxDirectiveDeprecated fastcgi_upstream_fail_timeout -syn keyword ngxDirectiveDeprecated fastcgi_upstream_max_fails +" syn keyword ngxDirectiveThirdParty contained fastcgi_bind +" syn keyword ngxDirectiveThirdParty contained fastcgi_buffer_size +" syn keyword ngxDirectiveThirdParty contained fastcgi_buffers +" syn keyword ngxDirectiveThirdParty contained fastcgi_busy_buffers_size +" syn keyword ngxDirectiveThirdParty contained fastcgi_cache +" syn keyword ngxDirectiveThirdParty contained fastcgi_cache_key +" syn keyword ngxDirectiveThirdParty contained fastcgi_cache_methods +" syn keyword ngxDirectiveThirdParty contained fastcgi_cache_min_uses +" syn keyword ngxDirectiveThirdParty contained fastcgi_cache_path +" syn keyword ngxDirectiveThirdParty contained fastcgi_cache_use_stale +" syn keyword ngxDirectiveThirdParty contained fastcgi_cache_valid +" syn keyword ngxDirectiveThirdParty contained fastcgi_catch_stderr +" syn keyword ngxDirectiveThirdParty contained fastcgi_connect_timeout +" syn keyword ngxDirectiveThirdParty contained fastcgi_hide_header +" syn keyword ngxDirectiveThirdParty contained fastcgi_ignore_client_abort +" syn keyword ngxDirectiveThirdParty contained fastcgi_ignore_headers +" syn keyword ngxDirectiveThirdParty contained fastcgi_index +" syn keyword ngxDirectiveThirdParty contained fastcgi_intercept_errors +" syn keyword ngxDirectiveThirdParty contained fastcgi_max_temp_file_size +" syn keyword ngxDirectiveThirdParty contained fastcgi_next_upstream +" syn keyword ngxDirectiveThirdParty contained fastcgi_param +" syn keyword ngxDirectiveThirdParty contained fastcgi_pass +" syn keyword ngxDirectiveThirdParty contained fastcgi_pass_header +" syn keyword ngxDirectiveThirdParty contained fastcgi_pass_request_body +" syn keyword ngxDirectiveThirdParty contained fastcgi_pass_request_headers +" syn keyword ngxDirectiveThirdParty contained fastcgi_read_timeout +" syn keyword ngxDirectiveThirdParty contained fastcgi_send_lowat +" syn keyword ngxDirectiveThirdParty contained fastcgi_send_timeout +" syn keyword ngxDirectiveThirdParty contained fastcgi_split_path_info +" syn keyword ngxDirectiveThirdParty contained fastcgi_store +" syn keyword ngxDirectiveThirdParty contained fastcgi_store_access +" syn keyword ngxDirectiveThirdParty contained fastcgi_temp_file_write_size +" syn keyword ngxDirectiveThirdParty contained fastcgi_temp_path +syn keyword ngxDirectiveDeprecated contained fastcgi_upstream_fail_timeout +syn keyword ngxDirectiveDeprecated contained fastcgi_upstream_max_fails " Akamai G2O Module " Nginx Module for Authenticating Akamai G2O requests -syn keyword ngxDirectiveThirdParty g2o -syn keyword ngxDirectiveThirdParty g2o_nonce -syn keyword ngxDirectiveThirdParty g2o_key +syn keyword ngxDirectiveThirdParty contained g2o +syn keyword ngxDirectiveThirdParty contained g2o_nonce +syn keyword ngxDirectiveThirdParty contained g2o_key " Lua Module " You can be very simple to execute lua code for nginx -syn keyword ngxDirectiveThirdParty lua_file +syn keyword ngxDirectiveThirdParty contained lua_file " Array Variable Module " Add support for array-typed variables to nginx config files -syn keyword ngxDirectiveThirdParty array_split -syn keyword ngxDirectiveThirdParty array_join -syn keyword ngxDirectiveThirdParty array_map -syn keyword ngxDirectiveThirdParty array_map_op +syn keyword ngxDirectiveThirdParty contained array_split +syn keyword ngxDirectiveThirdParty contained array_join +syn keyword ngxDirectiveThirdParty contained array_map +syn keyword ngxDirectiveThirdParty contained array_map_op " Nginx Audio Track for HTTP Live Streaming " This nginx module generates audio track for hls streams on the fly. -syn keyword ngxDirectiveThirdParty ngx_hls_audio_track -syn keyword ngxDirectiveThirdParty ngx_hls_audio_track_rootpath -syn keyword ngxDirectiveThirdParty ngx_hls_audio_track_output_format -syn keyword ngxDirectiveThirdParty ngx_hls_audio_track_output_header +syn keyword ngxDirectiveThirdParty contained ngx_hls_audio_track +syn keyword ngxDirectiveThirdParty contained ngx_hls_audio_track_rootpath +syn keyword ngxDirectiveThirdParty contained ngx_hls_audio_track_output_format +syn keyword ngxDirectiveThirdParty contained ngx_hls_audio_track_output_header " AWS Proxy Module " Nginx module to proxy to authenticated AWS services -syn keyword ngxDirectiveThirdParty aws_access_key -syn keyword ngxDirectiveThirdParty aws_key_scope -syn keyword ngxDirectiveThirdParty aws_signing_key -syn keyword ngxDirectiveThirdParty aws_endpoint -syn keyword ngxDirectiveThirdParty aws_s3_bucket -syn keyword ngxDirectiveThirdParty aws_sign +syn keyword ngxDirectiveThirdParty contained aws_access_key +syn keyword ngxDirectiveThirdParty contained aws_key_scope +syn keyword ngxDirectiveThirdParty contained aws_signing_key +syn keyword ngxDirectiveThirdParty contained aws_endpoint +syn keyword ngxDirectiveThirdParty contained aws_s3_bucket +syn keyword ngxDirectiveThirdParty contained aws_sign " Backtrace module " A Nginx module to dump backtrace when a worker process exits abnormally -syn keyword ngxDirectiveThirdParty backtrace_log -syn keyword ngxDirectiveThirdParty backtrace_max_stack_size +syn keyword ngxDirectiveThirdParty contained backtrace_log +syn keyword ngxDirectiveThirdParty contained backtrace_max_stack_size " Brotli Module " Nginx module for Brotli compression -syn keyword ngxDirectiveThirdParty brotli_static -syn keyword ngxDirectiveThirdParty brotli -syn keyword ngxDirectiveThirdParty brotli_types -syn keyword ngxDirectiveThirdParty brotli_buffers -syn keyword ngxDirectiveThirdParty brotli_comp_level -syn keyword ngxDirectiveThirdParty brotli_window -syn keyword ngxDirectiveThirdParty brotli_min_length +syn keyword ngxDirectiveThirdParty contained brotli_static +syn keyword ngxDirectiveThirdParty contained brotli +syn keyword ngxDirectiveThirdParty contained brotli_types +syn keyword ngxDirectiveThirdParty contained brotli_buffers +syn keyword ngxDirectiveThirdParty contained brotli_comp_level +syn keyword ngxDirectiveThirdParty contained brotli_window +syn keyword ngxDirectiveThirdParty contained brotli_min_length " Cache Purge Module " Adds ability to purge content from FastCGI, proxy, SCGI and uWSGI caches. -syn keyword ngxDirectiveThirdParty fastcgi_cache_purge -syn keyword ngxDirectiveThirdParty proxy_cache_purge -" syn keyword ngxDirectiveThirdParty scgi_cache_purge -" syn keyword ngxDirectiveThirdParty uwsgi_cache_purge +syn keyword ngxDirectiveThirdParty contained fastcgi_cache_purge +syn keyword ngxDirectiveThirdParty contained proxy_cache_purge +" syn keyword ngxDirectiveThirdParty contained scgi_cache_purge +" syn keyword ngxDirectiveThirdParty contained uwsgi_cache_purge " Chunkin Module (DEPRECATED) " HTTP 1.1 chunked-encoding request body support for Nginx. -syn keyword ngxDirectiveDeprecated chunkin -syn keyword ngxDirectiveDeprecated chunkin_keepalive -syn keyword ngxDirectiveDeprecated chunkin_max_chunks_per_buf -syn keyword ngxDirectiveDeprecated chunkin_resume +syn keyword ngxDirectiveDeprecated contained chunkin +syn keyword ngxDirectiveDeprecated contained chunkin_keepalive +syn keyword ngxDirectiveDeprecated contained chunkin_max_chunks_per_buf +syn keyword ngxDirectiveDeprecated contained chunkin_resume " Circle GIF Module " Generates simple circle images with the colors and size specified in the URL. -syn keyword ngxDirectiveThirdParty circle_gif -syn keyword ngxDirectiveThirdParty circle_gif_max_radius -syn keyword ngxDirectiveThirdParty circle_gif_min_radius -syn keyword ngxDirectiveThirdParty circle_gif_step_radius +syn keyword ngxDirectiveThirdParty contained circle_gif +syn keyword ngxDirectiveThirdParty contained circle_gif_max_radius +syn keyword ngxDirectiveThirdParty contained circle_gif_min_radius +syn keyword ngxDirectiveThirdParty contained circle_gif_step_radius " Nginx-Clojure Module " Parses the Accept-Language header and gives the most suitable locale from a list of supported locales. -syn keyword ngxDirectiveThirdParty jvm_path -syn keyword ngxDirectiveThirdParty jvm_var -syn keyword ngxDirectiveThirdParty jvm_classpath -syn keyword ngxDirectiveThirdParty jvm_classpath_check -syn keyword ngxDirectiveThirdParty jvm_workers -syn keyword ngxDirectiveThirdParty jvm_options -syn keyword ngxDirectiveThirdParty jvm_handler_type -syn keyword ngxDirectiveThirdParty jvm_init_handler_name -syn keyword ngxDirectiveThirdParty jvm_init_handler_code -syn keyword ngxDirectiveThirdParty jvm_exit_handler_name -syn keyword ngxDirectiveThirdParty jvm_exit_handler_code -syn keyword ngxDirectiveThirdParty handlers_lazy_init -syn keyword ngxDirectiveThirdParty auto_upgrade_ws -syn keyword ngxDirectiveThirdParty content_handler_type -syn keyword ngxDirectiveThirdParty content_handler_name -syn keyword ngxDirectiveThirdParty content_handler_code -syn keyword ngxDirectiveThirdParty rewrite_handler_type -syn keyword ngxDirectiveThirdParty rewrite_handler_name -syn keyword ngxDirectiveThirdParty rewrite_handler_code -syn keyword ngxDirectiveThirdParty access_handler_type -syn keyword ngxDirectiveThirdParty access_handler_name -syn keyword ngxDirectiveThirdParty access_handler_code -syn keyword ngxDirectiveThirdParty header_filter_type -syn keyword ngxDirectiveThirdParty header_filter_name -syn keyword ngxDirectiveThirdParty header_filter_code -syn keyword ngxDirectiveThirdParty content_handler_property -syn keyword ngxDirectiveThirdParty rewrite_handler_property -syn keyword ngxDirectiveThirdParty access_handler_property -syn keyword ngxDirectiveThirdParty header_filter_property -syn keyword ngxDirectiveThirdParty always_read_body -syn keyword ngxDirectiveThirdParty shared_map -syn keyword ngxDirectiveThirdParty write_page_size +syn keyword ngxDirectiveThirdParty contained jvm_path +syn keyword ngxDirectiveThirdParty contained jvm_var +syn keyword ngxDirectiveThirdParty contained jvm_classpath +syn keyword ngxDirectiveThirdParty contained jvm_classpath_check +syn keyword ngxDirectiveThirdParty contained jvm_workers +syn keyword ngxDirectiveThirdParty contained jvm_options +syn keyword ngxDirectiveThirdParty contained jvm_handler_type +syn keyword ngxDirectiveThirdParty contained jvm_init_handler_name +syn keyword ngxDirectiveThirdParty contained jvm_init_handler_code +syn keyword ngxDirectiveThirdParty contained jvm_exit_handler_name +syn keyword ngxDirectiveThirdParty contained jvm_exit_handler_code +syn keyword ngxDirectiveThirdParty contained handlers_lazy_init +syn keyword ngxDirectiveThirdParty contained auto_upgrade_ws +syn keyword ngxDirectiveThirdParty contained content_handler_type +syn keyword ngxDirectiveThirdParty contained content_handler_name +syn keyword ngxDirectiveThirdParty contained content_handler_code +syn keyword ngxDirectiveThirdParty contained rewrite_handler_type +syn keyword ngxDirectiveThirdParty contained rewrite_handler_name +syn keyword ngxDirectiveThirdParty contained rewrite_handler_code +syn keyword ngxDirectiveThirdParty contained access_handler_type +syn keyword ngxDirectiveThirdParty contained access_handler_name +syn keyword ngxDirectiveThirdParty contained access_handler_code +syn keyword ngxDirectiveThirdParty contained header_filter_type +syn keyword ngxDirectiveThirdParty contained header_filter_name +syn keyword ngxDirectiveThirdParty contained header_filter_code +syn keyword ngxDirectiveThirdParty contained content_handler_property +syn keyword ngxDirectiveThirdParty contained rewrite_handler_property +syn keyword ngxDirectiveThirdParty contained access_handler_property +syn keyword ngxDirectiveThirdParty contained header_filter_property +syn keyword ngxDirectiveThirdParty contained always_read_body +syn keyword ngxDirectiveThirdParty contained shared_map +syn keyword ngxDirectiveThirdParty contained write_page_size " Upstream Consistent Hash " A load balancer that uses an internal consistent hash ring to select the right backend node. -syn keyword ngxDirectiveThirdParty consistent_hash +syn keyword ngxDirectiveThirdParty contained consistent_hash " Nginx Development Kit " The NDK is an Nginx module that is designed to extend the core functionality of the excellent Nginx webserver in a way that can be used as a basis of other Nginx modules. " NDK_UPSTREAM_LIST " This submodule provides a directive that creates a list of upstreams, with optional weighting. This list can then be used by other modules to hash over the upstreams however they choose. -syn keyword ngxDirectiveThirdParty upstream_list +syn keyword ngxDirectiveThirdParty contained upstream_list " Drizzle Module " Upstream module for talking to MySQL and Drizzle directly -syn keyword ngxDirectiveThirdParty drizzle_server -syn keyword ngxDirectiveThirdParty drizzle_keepalive -syn keyword ngxDirectiveThirdParty drizzle_query -syn keyword ngxDirectiveThirdParty drizzle_pass -syn keyword ngxDirectiveThirdParty drizzle_connect_timeout -syn keyword ngxDirectiveThirdParty drizzle_send_query_timeout -syn keyword ngxDirectiveThirdParty drizzle_recv_cols_timeout -syn keyword ngxDirectiveThirdParty drizzle_recv_rows_timeout -syn keyword ngxDirectiveThirdParty drizzle_buffer_size -syn keyword ngxDirectiveThirdParty drizzle_module_header -syn keyword ngxDirectiveThirdParty drizzle_status +syn keyword ngxDirectiveThirdParty contained drizzle_server +syn keyword ngxDirectiveThirdParty contained drizzle_keepalive +syn keyword ngxDirectiveThirdParty contained drizzle_query +syn keyword ngxDirectiveThirdParty contained drizzle_pass +syn keyword ngxDirectiveThirdParty contained drizzle_connect_timeout +syn keyword ngxDirectiveThirdParty contained drizzle_send_query_timeout +syn keyword ngxDirectiveThirdParty contained drizzle_recv_cols_timeout +syn keyword ngxDirectiveThirdParty contained drizzle_recv_rows_timeout +syn keyword ngxDirectiveThirdParty contained drizzle_buffer_size +syn keyword ngxDirectiveThirdParty contained drizzle_module_header +syn keyword ngxDirectiveThirdParty contained drizzle_status " Dynamic ETags Module " Attempt at handling ETag / If-None-Match on proxied content. -syn keyword ngxDirectiveThirdParty dynamic_etags +syn keyword ngxDirectiveThirdParty contained dynamic_etags " Echo Module " Bringing the power of "echo", "sleep", "time" and more to Nginx's config file -syn keyword ngxDirectiveThirdParty echo -syn keyword ngxDirectiveThirdParty echo_duplicate -syn keyword ngxDirectiveThirdParty echo_flush -syn keyword ngxDirectiveThirdParty echo_sleep -syn keyword ngxDirectiveThirdParty echo_blocking_sleep -syn keyword ngxDirectiveThirdParty echo_reset_timer -syn keyword ngxDirectiveThirdParty echo_read_request_body -syn keyword ngxDirectiveThirdParty echo_location_async -syn keyword ngxDirectiveThirdParty echo_location -syn keyword ngxDirectiveThirdParty echo_subrequest_async -syn keyword ngxDirectiveThirdParty echo_subrequest -syn keyword ngxDirectiveThirdParty echo_foreach_split -syn keyword ngxDirectiveThirdParty echo_end -syn keyword ngxDirectiveThirdParty echo_request_body -syn keyword ngxDirectiveThirdParty echo_exec -syn keyword ngxDirectiveThirdParty echo_status -syn keyword ngxDirectiveThirdParty echo_before_body -syn keyword ngxDirectiveThirdParty echo_after_body +syn keyword ngxDirectiveThirdParty contained echo +syn keyword ngxDirectiveThirdParty contained echo_duplicate +syn keyword ngxDirectiveThirdParty contained echo_flush +syn keyword ngxDirectiveThirdParty contained echo_sleep +syn keyword ngxDirectiveThirdParty contained echo_blocking_sleep +syn keyword ngxDirectiveThirdParty contained echo_reset_timer +syn keyword ngxDirectiveThirdParty contained echo_read_request_body +syn keyword ngxDirectiveThirdParty contained echo_location_async +syn keyword ngxDirectiveThirdParty contained echo_location +syn keyword ngxDirectiveThirdParty contained echo_subrequest_async +syn keyword ngxDirectiveThirdParty contained echo_subrequest +syn keyword ngxDirectiveThirdParty contained echo_foreach_split +syn keyword ngxDirectiveThirdParty contained echo_end +syn keyword ngxDirectiveThirdParty contained echo_request_body +syn keyword ngxDirectiveThirdParty contained echo_exec +syn keyword ngxDirectiveThirdParty contained echo_status +syn keyword ngxDirectiveThirdParty contained echo_before_body +syn keyword ngxDirectiveThirdParty contained echo_after_body " Encrypted Session Module " Encrypt and decrypt nginx variable values -syn keyword ngxDirectiveThirdParty encrypted_session_key -syn keyword ngxDirectiveThirdParty encrypted_session_iv -syn keyword ngxDirectiveThirdParty encrypted_session_expires -syn keyword ngxDirectiveThirdParty set_encrypt_session -syn keyword ngxDirectiveThirdParty set_decrypt_session +syn keyword ngxDirectiveThirdParty contained encrypted_session_key +syn keyword ngxDirectiveThirdParty contained encrypted_session_iv +syn keyword ngxDirectiveThirdParty contained encrypted_session_expires +syn keyword ngxDirectiveThirdParty contained set_encrypt_session +syn keyword ngxDirectiveThirdParty contained set_decrypt_session " Enhanced Memcached Module " This module is based on the standard Nginx Memcached module, with some additonal features -syn keyword ngxDirectiveThirdParty enhanced_memcached_pass -syn keyword ngxDirectiveThirdParty enhanced_memcached_hash_keys_with_md5 -syn keyword ngxDirectiveThirdParty enhanced_memcached_allow_put -syn keyword ngxDirectiveThirdParty enhanced_memcached_allow_delete -syn keyword ngxDirectiveThirdParty enhanced_memcached_stats -syn keyword ngxDirectiveThirdParty enhanced_memcached_flush -syn keyword ngxDirectiveThirdParty enhanced_memcached_flush_namespace -syn keyword ngxDirectiveThirdParty enhanced_memcached_bind -syn keyword ngxDirectiveThirdParty enhanced_memcached_connect_timeout -syn keyword ngxDirectiveThirdParty enhanced_memcached_send_timeout -syn keyword ngxDirectiveThirdParty enhanced_memcached_buffer_size -syn keyword ngxDirectiveThirdParty enhanced_memcached_read_timeout +syn keyword ngxDirectiveThirdParty contained enhanced_memcached_pass +syn keyword ngxDirectiveThirdParty contained enhanced_memcached_hash_keys_with_md5 +syn keyword ngxDirectiveThirdParty contained enhanced_memcached_allow_put +syn keyword ngxDirectiveThirdParty contained enhanced_memcached_allow_delete +syn keyword ngxDirectiveThirdParty contained enhanced_memcached_stats +syn keyword ngxDirectiveThirdParty contained enhanced_memcached_flush +syn keyword ngxDirectiveThirdParty contained enhanced_memcached_flush_namespace +syn keyword ngxDirectiveThirdParty contained enhanced_memcached_bind +syn keyword ngxDirectiveThirdParty contained enhanced_memcached_connect_timeout +syn keyword ngxDirectiveThirdParty contained enhanced_memcached_send_timeout +syn keyword ngxDirectiveThirdParty contained enhanced_memcached_buffer_size +syn keyword ngxDirectiveThirdParty contained enhanced_memcached_read_timeout " Events Module (DEPRECATED) " Provides options for start/stop events. -syn keyword ngxDirectiveDeprecated on_start -syn keyword ngxDirectiveDeprecated on_stop +syn keyword ngxDirectiveDeprecated contained on_start +syn keyword ngxDirectiveDeprecated contained on_stop " EY Balancer Module " Adds a request queue to Nginx that allows the limiting of concurrent requests passed to the upstream. -syn keyword ngxDirectiveThirdParty max_connections -syn keyword ngxDirectiveThirdParty max_connections_max_queue_length -syn keyword ngxDirectiveThirdParty max_connections_queue_timeout +syn keyword ngxDirectiveThirdParty contained max_connections +syn keyword ngxDirectiveThirdParty contained max_connections_max_queue_length +syn keyword ngxDirectiveThirdParty contained max_connections_queue_timeout " Upstream Fair Balancer " Sends an incoming request to the least-busy backend server, rather than distributing requests round-robin. -syn keyword ngxDirectiveThirdParty fair -syn keyword ngxDirectiveThirdParty upstream_fair_shm_size +syn keyword ngxDirectiveThirdParty contained fair +syn keyword ngxDirectiveThirdParty contained upstream_fair_shm_size " Fancy Indexes Module " Like the built-in autoindex module, but fancier. -syn keyword ngxDirectiveThirdParty fancyindex -syn keyword ngxDirectiveThirdParty fancyindex_default_sort -syn keyword ngxDirectiveThirdParty fancyindex_directories_first -syn keyword ngxDirectiveThirdParty fancyindex_css_href -syn keyword ngxDirectiveThirdParty fancyindex_exact_size -syn keyword ngxDirectiveThirdParty fancyindex_name_length -syn keyword ngxDirectiveThirdParty fancyindex_footer -syn keyword ngxDirectiveThirdParty fancyindex_header -syn keyword ngxDirectiveThirdParty fancyindex_show_path -syn keyword ngxDirectiveThirdParty fancyindex_ignore -syn keyword ngxDirectiveThirdParty fancyindex_hide_symlinks -syn keyword ngxDirectiveThirdParty fancyindex_localtime -syn keyword ngxDirectiveThirdParty fancyindex_time_format +syn keyword ngxDirectiveThirdParty contained fancyindex +syn keyword ngxDirectiveThirdParty contained fancyindex_default_sort +syn keyword ngxDirectiveThirdParty contained fancyindex_directories_first +syn keyword ngxDirectiveThirdParty contained fancyindex_css_href +syn keyword ngxDirectiveThirdParty contained fancyindex_exact_size +syn keyword ngxDirectiveThirdParty contained fancyindex_name_length +syn keyword ngxDirectiveThirdParty contained fancyindex_footer +syn keyword ngxDirectiveThirdParty contained fancyindex_header +syn keyword ngxDirectiveThirdParty contained fancyindex_show_path +syn keyword ngxDirectiveThirdParty contained fancyindex_ignore +syn keyword ngxDirectiveThirdParty contained fancyindex_hide_symlinks +syn keyword ngxDirectiveThirdParty contained fancyindex_localtime +syn keyword ngxDirectiveThirdParty contained fancyindex_time_format " Form Auth Module " Provides authentication and authorization with credentials submitted via POST request -syn keyword ngxDirectiveThirdParty form_auth -syn keyword ngxDirectiveThirdParty form_auth_pam_service -syn keyword ngxDirectiveThirdParty form_auth_login -syn keyword ngxDirectiveThirdParty form_auth_password -syn keyword ngxDirectiveThirdParty form_auth_remote_user +syn keyword ngxDirectiveThirdParty contained form_auth +syn keyword ngxDirectiveThirdParty contained form_auth_pam_service +syn keyword ngxDirectiveThirdParty contained form_auth_login +syn keyword ngxDirectiveThirdParty contained form_auth_password +syn keyword ngxDirectiveThirdParty contained form_auth_remote_user " Form Input Module " Reads HTTP POST and PUT request body encoded in "application/x-www-form-urlencoded" and parses the arguments into nginx variables. -syn keyword ngxDirectiveThirdParty set_form_input -syn keyword ngxDirectiveThirdParty set_form_input_multi +syn keyword ngxDirectiveThirdParty contained set_form_input +syn keyword ngxDirectiveThirdParty contained set_form_input_multi " GeoIP Module (DEPRECATED) " Country code lookups via the MaxMind GeoIP API. -syn keyword ngxDirectiveDeprecated geoip_country_file +syn keyword ngxDirectiveDeprecated contained geoip_country_file " GeoIP 2 Module " Creates variables with values from the maxmind geoip2 databases based on the client IP -syn keyword ngxDirectiveThirdParty geoip2 +syn keyword ngxDirectiveThirdParty contained geoip2 " GridFS Module " Nginx module for serving files from MongoDB's GridFS -syn keyword ngxDirectiveThirdParty gridfs +syn keyword ngxDirectiveThirdParty contained gridfs " Headers More Module " Set and clear input and output headers...more than "add"! -syn keyword ngxDirectiveThirdParty more_clear_headers -syn keyword ngxDirectiveThirdParty more_clear_input_headers -syn keyword ngxDirectiveThirdParty more_set_headers -syn keyword ngxDirectiveThirdParty more_set_input_headers +syn keyword ngxDirectiveThirdParty contained more_clear_headers +syn keyword ngxDirectiveThirdParty contained more_clear_input_headers +syn keyword ngxDirectiveThirdParty contained more_set_headers +syn keyword ngxDirectiveThirdParty contained more_set_input_headers " Health Checks Upstreams Module " Polls backends and if they respond with HTTP 200 + an optional request body, they are marked good. Otherwise, they are marked bad. -syn keyword ngxDirectiveThirdParty healthcheck_enabled -syn keyword ngxDirectiveThirdParty healthcheck_delay -syn keyword ngxDirectiveThirdParty healthcheck_timeout -syn keyword ngxDirectiveThirdParty healthcheck_failcount -syn keyword ngxDirectiveThirdParty healthcheck_send -syn keyword ngxDirectiveThirdParty healthcheck_expected -syn keyword ngxDirectiveThirdParty healthcheck_buffer -syn keyword ngxDirectiveThirdParty healthcheck_status +syn keyword ngxDirectiveThirdParty contained healthcheck_enabled +syn keyword ngxDirectiveThirdParty contained healthcheck_delay +syn keyword ngxDirectiveThirdParty contained healthcheck_timeout +syn keyword ngxDirectiveThirdParty contained healthcheck_failcount +syn keyword ngxDirectiveThirdParty contained healthcheck_send +syn keyword ngxDirectiveThirdParty contained healthcheck_expected +syn keyword ngxDirectiveThirdParty contained healthcheck_buffer +syn keyword ngxDirectiveThirdParty contained healthcheck_status " HTTP Accounting Module " Add traffic stat function to nginx. Useful for http accounting based on nginx configuration logic -syn keyword ngxDirectiveThirdParty http_accounting -syn keyword ngxDirectiveThirdParty http_accounting_log -syn keyword ngxDirectiveThirdParty http_accounting_id -syn keyword ngxDirectiveThirdParty http_accounting_interval -syn keyword ngxDirectiveThirdParty http_accounting_perturb +syn keyword ngxDirectiveThirdParty contained http_accounting +syn keyword ngxDirectiveThirdParty contained http_accounting_log +syn keyword ngxDirectiveThirdParty contained http_accounting_id +syn keyword ngxDirectiveThirdParty contained http_accounting_interval +syn keyword ngxDirectiveThirdParty contained http_accounting_perturb " Nginx Digest Authentication module " Digest Authentication for Nginx -syn keyword ngxDirectiveThirdParty auth_digest -syn keyword ngxDirectiveThirdParty auth_digest_user_file -syn keyword ngxDirectiveThirdParty auth_digest_timeout -syn keyword ngxDirectiveThirdParty auth_digest_expires -syn keyword ngxDirectiveThirdParty auth_digest_replays -syn keyword ngxDirectiveThirdParty auth_digest_shm_size +syn keyword ngxDirectiveThirdParty contained auth_digest +syn keyword ngxDirectiveThirdParty contained auth_digest_user_file +syn keyword ngxDirectiveThirdParty contained auth_digest_timeout +syn keyword ngxDirectiveThirdParty contained auth_digest_expires +syn keyword ngxDirectiveThirdParty contained auth_digest_replays +syn keyword ngxDirectiveThirdParty contained auth_digest_shm_size " Auth PAM Module " HTTP Basic Authentication using PAM. -syn keyword ngxDirectiveThirdParty auth_pam -syn keyword ngxDirectiveThirdParty auth_pam_service_name +syn keyword ngxDirectiveThirdParty contained auth_pam +syn keyword ngxDirectiveThirdParty contained auth_pam_service_name " HTTP Auth Request Module " Implements client authorization based on the result of a subrequest -" syn keyword ngxDirectiveThirdParty auth_request -" syn keyword ngxDirectiveThirdParty auth_request_set +" syn keyword ngxDirectiveThirdParty contained auth_request +" syn keyword ngxDirectiveThirdParty contained auth_request_set " HTTP Concatenation module for Nginx " A Nginx module for concatenating files in a given context: CSS and JS files usually -syn keyword ngxDirectiveThirdParty concat -syn keyword ngxDirectiveThirdParty concat_types -syn keyword ngxDirectiveThirdParty concat_unique -syn keyword ngxDirectiveThirdParty concat_max_files -syn keyword ngxDirectiveThirdParty concat_delimiter -syn keyword ngxDirectiveThirdParty concat_ignore_file_error +syn keyword ngxDirectiveThirdParty contained concat +syn keyword ngxDirectiveThirdParty contained concat_types +syn keyword ngxDirectiveThirdParty contained concat_unique +syn keyword ngxDirectiveThirdParty contained concat_max_files +syn keyword ngxDirectiveThirdParty contained concat_delimiter +syn keyword ngxDirectiveThirdParty contained concat_ignore_file_error " HTTP Dynamic Upstream Module " Update upstreams' config by restful interface -syn keyword ngxDirectiveThirdParty dyups_interface -syn keyword ngxDirectiveThirdParty dyups_read_msg_timeout -syn keyword ngxDirectiveThirdParty dyups_shm_zone_size -syn keyword ngxDirectiveThirdParty dyups_upstream_conf -syn keyword ngxDirectiveThirdParty dyups_trylock +syn keyword ngxDirectiveThirdParty contained dyups_interface +syn keyword ngxDirectiveThirdParty contained dyups_read_msg_timeout +syn keyword ngxDirectiveThirdParty contained dyups_shm_zone_size +syn keyword ngxDirectiveThirdParty contained dyups_upstream_conf +syn keyword ngxDirectiveThirdParty contained dyups_trylock " HTTP Footer If Filter Module " The ngx_http_footer_if_filter_module is used to add given content to the end of the response according to the condition specified. -syn keyword ngxDirectiveThirdParty footer_if +syn keyword ngxDirectiveThirdParty contained footer_if " HTTP Footer Filter Module " This module implements a body filter that adds a given string to the page footer. -syn keyword ngxDirectiveThirdParty footer -syn keyword ngxDirectiveThirdParty footer_types +syn keyword ngxDirectiveThirdParty contained footer +syn keyword ngxDirectiveThirdParty contained footer_types " HTTP Internal Redirect Module " Make an internal redirect to the uri specified according to the condition specified. -syn keyword ngxDirectiveThirdParty internal_redirect_if -syn keyword ngxDirectiveThirdParty internal_redirect_if_no_postponed +syn keyword ngxDirectiveThirdParty contained internal_redirect_if +syn keyword ngxDirectiveThirdParty contained internal_redirect_if_no_postponed " HTTP JavaScript Module " Embedding SpiderMonkey. Nearly full port on Perl module. -syn keyword ngxDirectiveThirdParty js -syn keyword ngxDirectiveThirdParty js_filter -syn keyword ngxDirectiveThirdParty js_filter_types -syn keyword ngxDirectiveThirdParty js_load -syn keyword ngxDirectiveThirdParty js_maxmem -syn keyword ngxDirectiveThirdParty js_require -syn keyword ngxDirectiveThirdParty js_set -syn keyword ngxDirectiveThirdParty js_utf8 +syn keyword ngxDirectiveThirdParty contained js +syn keyword ngxDirectiveThirdParty contained js_filter +syn keyword ngxDirectiveThirdParty contained js_filter_types +syn keyword ngxDirectiveThirdParty contained js_load +syn keyword ngxDirectiveThirdParty contained js_maxmem +syn keyword ngxDirectiveThirdParty contained js_require +syn keyword ngxDirectiveThirdParty contained js_set +syn keyword ngxDirectiveThirdParty contained js_utf8 " HTTP Push Module (DEPRECATED) " Turn Nginx into an adept long-polling HTTP Push (Comet) server. -syn keyword ngxDirectiveDeprecated push_buffer_size -syn keyword ngxDirectiveDeprecated push_listener -syn keyword ngxDirectiveDeprecated push_message_timeout -syn keyword ngxDirectiveDeprecated push_queue_messages -syn keyword ngxDirectiveDeprecated push_sender +syn keyword ngxDirectiveDeprecated contained push_buffer_size +syn keyword ngxDirectiveDeprecated contained push_listener +syn keyword ngxDirectiveDeprecated contained push_message_timeout +syn keyword ngxDirectiveDeprecated contained push_queue_messages +syn keyword ngxDirectiveDeprecated contained push_sender " HTTP Redis Module " Redis support. -syn keyword ngxDirectiveThirdParty redis_bind -syn keyword ngxDirectiveThirdParty redis_buffer_size -syn keyword ngxDirectiveThirdParty redis_connect_timeout -syn keyword ngxDirectiveThirdParty redis_next_upstream -syn keyword ngxDirectiveThirdParty redis_pass -syn keyword ngxDirectiveThirdParty redis_read_timeout -syn keyword ngxDirectiveThirdParty redis_send_timeout +syn keyword ngxDirectiveThirdParty contained redis_bind +syn keyword ngxDirectiveThirdParty contained redis_buffer_size +syn keyword ngxDirectiveThirdParty contained redis_connect_timeout +syn keyword ngxDirectiveThirdParty contained redis_next_upstream +syn keyword ngxDirectiveThirdParty contained redis_pass +syn keyword ngxDirectiveThirdParty contained redis_read_timeout +syn keyword ngxDirectiveThirdParty contained redis_send_timeout " Iconv Module " A character conversion nginx module using libiconv -syn keyword ngxDirectiveThirdParty set_iconv -syn keyword ngxDirectiveThirdParty iconv_buffer_size -syn keyword ngxDirectiveThirdParty iconv_filter +syn keyword ngxDirectiveThirdParty contained set_iconv +syn keyword ngxDirectiveThirdParty contained iconv_buffer_size +syn keyword ngxDirectiveThirdParty contained iconv_filter " IP Blocker Module " An efficient shared memory IP blocking system for nginx. -syn keyword ngxDirectiveThirdParty ip_blocker +syn keyword ngxDirectiveThirdParty contained ip_blocker " IP2Location Module " Allows user to lookup for geolocation information using IP2Location database -syn keyword ngxDirectiveThirdParty ip2location_database +syn keyword ngxDirectiveThirdParty contained ip2location_database " JS Module " Reflect the nginx functionality in JS -syn keyword ngxDirectiveThirdParty js -syn keyword ngxDirectiveThirdParty js_access -syn keyword ngxDirectiveThirdParty js_load -syn keyword ngxDirectiveThirdParty js_set +syn keyword ngxDirectiveThirdParty contained js +syn keyword ngxDirectiveThirdParty contained js_access +syn keyword ngxDirectiveThirdParty contained js_load +syn keyword ngxDirectiveThirdParty contained js_set " Limit Upload Rate Module " Limit client-upload rate when they are sending request bodies to you -syn keyword ngxDirectiveThirdParty limit_upload_rate -syn keyword ngxDirectiveThirdParty limit_upload_rate_after +syn keyword ngxDirectiveThirdParty contained limit_upload_rate +syn keyword ngxDirectiveThirdParty contained limit_upload_rate_after " Limit Upstream Module " Limit the number of connections to upstream for NGINX -syn keyword ngxDirectiveThirdParty limit_upstream_zone -syn keyword ngxDirectiveThirdParty limit_upstream_conn -syn keyword ngxDirectiveThirdParty limit_upstream_log_level +syn keyword ngxDirectiveThirdParty contained limit_upstream_zone +syn keyword ngxDirectiveThirdParty contained limit_upstream_conn +syn keyword ngxDirectiveThirdParty contained limit_upstream_log_level " Log If Module " Conditional accesslog for nginx -syn keyword ngxDirectiveThirdParty access_log_bypass_if +syn keyword ngxDirectiveThirdParty contained access_log_bypass_if " Log Request Speed (DEPRECATED) " Log the time it took to process each request. -syn keyword ngxDirectiveDeprecated log_request_speed_filter -syn keyword ngxDirectiveDeprecated log_request_speed_filter_timeout +syn keyword ngxDirectiveDeprecated contained log_request_speed_filter +syn keyword ngxDirectiveDeprecated contained log_request_speed_filter_timeout " Log ZeroMQ Module " ZeroMQ logger module for nginx -syn keyword ngxDirectiveThirdParty log_zmq_server -syn keyword ngxDirectiveThirdParty log_zmq_endpoint -syn keyword ngxDirectiveThirdParty log_zmq_format -syn keyword ngxDirectiveThirdParty log_zmq_off +syn keyword ngxDirectiveThirdParty contained log_zmq_server +syn keyword ngxDirectiveThirdParty contained log_zmq_endpoint +syn keyword ngxDirectiveThirdParty contained log_zmq_format +syn keyword ngxDirectiveThirdParty contained log_zmq_off " Lower/UpperCase Module " This module simply uppercases or lowercases a string and saves it into a new variable. -syn keyword ngxDirectiveThirdParty lower -syn keyword ngxDirectiveThirdParty upper +syn keyword ngxDirectiveThirdParty contained lower +syn keyword ngxDirectiveThirdParty contained upper " Lua Upstream Module " Nginx C module to expose Lua API to ngx_lua for Nginx upstreams " Lua Module " Embed the Power of Lua into NGINX HTTP servers -syn keyword ngxDirectiveThirdParty lua_use_default_type -syn keyword ngxDirectiveThirdParty lua_malloc_trim -syn keyword ngxDirectiveThirdParty lua_code_cache -syn keyword ngxDirectiveThirdParty lua_regex_cache_max_entries -syn keyword ngxDirectiveThirdParty lua_regex_match_limit -syn keyword ngxDirectiveThirdParty lua_package_path -syn keyword ngxDirectiveThirdParty lua_package_cpath -syn keyword ngxDirectiveThirdParty init_by_lua -syn keyword ngxDirectiveThirdParty init_by_lua_block -syn keyword ngxDirectiveThirdParty init_by_lua_file -syn keyword ngxDirectiveThirdParty init_worker_by_lua -syn keyword ngxDirectiveThirdParty init_worker_by_lua_block -syn keyword ngxDirectiveThirdParty init_worker_by_lua_file -syn keyword ngxDirectiveThirdParty set_by_lua -syn keyword ngxDirectiveThirdParty set_by_lua_block -syn keyword ngxDirectiveThirdParty set_by_lua_file -syn keyword ngxDirectiveThirdParty content_by_lua -syn keyword ngxDirectiveThirdParty content_by_lua_block -syn keyword ngxDirectiveThirdParty content_by_lua_file -syn keyword ngxDirectiveThirdParty rewrite_by_lua -syn keyword ngxDirectiveThirdParty rewrite_by_lua_block -syn keyword ngxDirectiveThirdParty rewrite_by_lua_file -syn keyword ngxDirectiveThirdParty access_by_lua -syn keyword ngxDirectiveThirdParty access_by_lua_block -syn keyword ngxDirectiveThirdParty access_by_lua_file -syn keyword ngxDirectiveThirdParty header_filter_by_lua -syn keyword ngxDirectiveThirdParty header_filter_by_lua_block -syn keyword ngxDirectiveThirdParty header_filter_by_lua_file -syn keyword ngxDirectiveThirdParty body_filter_by_lua -syn keyword ngxDirectiveThirdParty body_filter_by_lua_block -syn keyword ngxDirectiveThirdParty body_filter_by_lua_file -syn keyword ngxDirectiveThirdParty log_by_lua -syn keyword ngxDirectiveThirdParty log_by_lua_block -syn keyword ngxDirectiveThirdParty log_by_lua_file -syn keyword ngxDirectiveThirdParty balancer_by_lua_block -syn keyword ngxDirectiveThirdParty balancer_by_lua_file -syn keyword ngxDirectiveThirdParty lua_need_request_body -syn keyword ngxDirectiveThirdParty ssl_certificate_by_lua_block -syn keyword ngxDirectiveThirdParty ssl_certificate_by_lua_file -syn keyword ngxDirectiveThirdParty ssl_session_fetch_by_lua_block -syn keyword ngxDirectiveThirdParty ssl_session_fetch_by_lua_file -syn keyword ngxDirectiveThirdParty ssl_session_store_by_lua_block -syn keyword ngxDirectiveThirdParty ssl_session_store_by_lua_file -syn keyword ngxDirectiveThirdParty lua_shared_dict -syn keyword ngxDirectiveThirdParty lua_socket_connect_timeout -syn keyword ngxDirectiveThirdParty lua_socket_send_timeout -syn keyword ngxDirectiveThirdParty lua_socket_send_lowat -syn keyword ngxDirectiveThirdParty lua_socket_read_timeout -syn keyword ngxDirectiveThirdParty lua_socket_buffer_size -syn keyword ngxDirectiveThirdParty lua_socket_pool_size -syn keyword ngxDirectiveThirdParty lua_socket_keepalive_timeout -syn keyword ngxDirectiveThirdParty lua_socket_log_errors -syn keyword ngxDirectiveThirdParty lua_ssl_ciphers -syn keyword ngxDirectiveThirdParty lua_ssl_crl -syn keyword ngxDirectiveThirdParty lua_ssl_protocols -syn keyword ngxDirectiveThirdParty lua_ssl_trusted_certificate -syn keyword ngxDirectiveThirdParty lua_ssl_verify_depth -syn keyword ngxDirectiveThirdParty lua_http10_buffering -syn keyword ngxDirectiveThirdParty rewrite_by_lua_no_postpone -syn keyword ngxDirectiveThirdParty access_by_lua_no_postpone -syn keyword ngxDirectiveThirdParty lua_transform_underscores_in_response_headers -syn keyword ngxDirectiveThirdParty lua_check_client_abort -syn keyword ngxDirectiveThirdParty lua_max_pending_timers -syn keyword ngxDirectiveThirdParty lua_max_running_timers +syn keyword ngxDirectiveThirdParty contained lua_use_default_type +syn keyword ngxDirectiveThirdParty contained lua_malloc_trim +syn keyword ngxDirectiveThirdParty contained lua_code_cache +syn keyword ngxDirectiveThirdParty contained lua_regex_cache_max_entries +syn keyword ngxDirectiveThirdParty contained lua_regex_match_limit +syn keyword ngxDirectiveThirdParty contained lua_package_path +syn keyword ngxDirectiveThirdParty contained lua_package_cpath +syn keyword ngxDirectiveThirdParty contained init_by_lua +syn keyword ngxDirectiveThirdParty contained init_by_lua_block +syn keyword ngxDirectiveThirdParty contained init_by_lua_file +syn keyword ngxDirectiveThirdParty contained init_worker_by_lua +syn keyword ngxDirectiveThirdParty contained init_worker_by_lua_block +syn keyword ngxDirectiveThirdParty contained init_worker_by_lua_file +syn keyword ngxDirectiveThirdParty contained set_by_lua +syn keyword ngxDirectiveThirdParty contained set_by_lua_block +syn keyword ngxDirectiveThirdParty contained set_by_lua_file +syn keyword ngxDirectiveThirdParty contained content_by_lua +syn keyword ngxDirectiveThirdParty contained content_by_lua_block +syn keyword ngxDirectiveThirdParty contained content_by_lua_file +syn keyword ngxDirectiveThirdParty contained rewrite_by_lua +syn keyword ngxDirectiveThirdParty contained rewrite_by_lua_block +syn keyword ngxDirectiveThirdParty contained rewrite_by_lua_file +syn keyword ngxDirectiveThirdParty contained access_by_lua +syn keyword ngxDirectiveThirdParty contained access_by_lua_block +syn keyword ngxDirectiveThirdParty contained access_by_lua_file +syn keyword ngxDirectiveThirdParty contained header_filter_by_lua +syn keyword ngxDirectiveThirdParty contained header_filter_by_lua_block +syn keyword ngxDirectiveThirdParty contained header_filter_by_lua_file +syn keyword ngxDirectiveThirdParty contained body_filter_by_lua +syn keyword ngxDirectiveThirdParty contained body_filter_by_lua_block +syn keyword ngxDirectiveThirdParty contained body_filter_by_lua_file +syn keyword ngxDirectiveThirdParty contained log_by_lua +syn keyword ngxDirectiveThirdParty contained log_by_lua_block +syn keyword ngxDirectiveThirdParty contained log_by_lua_file +syn keyword ngxDirectiveThirdParty contained balancer_by_lua_block +syn keyword ngxDirectiveThirdParty contained balancer_by_lua_file +syn keyword ngxDirectiveThirdParty contained lua_need_request_body +syn keyword ngxDirectiveThirdParty contained ssl_certificate_by_lua_block +syn keyword ngxDirectiveThirdParty contained ssl_certificate_by_lua_file +syn keyword ngxDirectiveThirdParty contained ssl_session_fetch_by_lua_block +syn keyword ngxDirectiveThirdParty contained ssl_session_fetch_by_lua_file +syn keyword ngxDirectiveThirdParty contained ssl_session_store_by_lua_block +syn keyword ngxDirectiveThirdParty contained ssl_session_store_by_lua_file +syn keyword ngxDirectiveThirdParty contained lua_shared_dict +syn keyword ngxDirectiveThirdParty contained lua_socket_connect_timeout +syn keyword ngxDirectiveThirdParty contained lua_socket_send_timeout +syn keyword ngxDirectiveThirdParty contained lua_socket_send_lowat +syn keyword ngxDirectiveThirdParty contained lua_socket_read_timeout +syn keyword ngxDirectiveThirdParty contained lua_socket_buffer_size +syn keyword ngxDirectiveThirdParty contained lua_socket_pool_size +syn keyword ngxDirectiveThirdParty contained lua_socket_keepalive_timeout +syn keyword ngxDirectiveThirdParty contained lua_socket_log_errors +syn keyword ngxDirectiveThirdParty contained lua_ssl_ciphers +syn keyword ngxDirectiveThirdParty contained lua_ssl_crl +syn keyword ngxDirectiveThirdParty contained lua_ssl_protocols +syn keyword ngxDirectiveThirdParty contained lua_ssl_trusted_certificate +syn keyword ngxDirectiveThirdParty contained lua_ssl_verify_depth +syn keyword ngxDirectiveThirdParty contained lua_http10_buffering +syn keyword ngxDirectiveThirdParty contained rewrite_by_lua_no_postpone +syn keyword ngxDirectiveThirdParty contained access_by_lua_no_postpone +syn keyword ngxDirectiveThirdParty contained lua_transform_underscores_in_response_headers +syn keyword ngxDirectiveThirdParty contained lua_check_client_abort +syn keyword ngxDirectiveThirdParty contained lua_max_pending_timers +syn keyword ngxDirectiveThirdParty contained lua_max_running_timers " MD5 Filter Module " A content filter for nginx, which returns the md5 hash of the content otherwise returned. -syn keyword ngxDirectiveThirdParty md5_filter +syn keyword ngxDirectiveThirdParty contained md5_filter " Memc Module " An extended version of the standard memcached module that supports set, add, delete, and many more memcached commands. -syn keyword ngxDirectiveThirdParty memc_buffer_size -syn keyword ngxDirectiveThirdParty memc_cmds_allowed -syn keyword ngxDirectiveThirdParty memc_connect_timeout -syn keyword ngxDirectiveThirdParty memc_flags_to_last_modified -syn keyword ngxDirectiveThirdParty memc_next_upstream -syn keyword ngxDirectiveThirdParty memc_pass -syn keyword ngxDirectiveThirdParty memc_read_timeout -syn keyword ngxDirectiveThirdParty memc_send_timeout -syn keyword ngxDirectiveThirdParty memc_upstream_fail_timeout -syn keyword ngxDirectiveThirdParty memc_upstream_max_fails +syn keyword ngxDirectiveThirdParty contained memc_buffer_size +syn keyword ngxDirectiveThirdParty contained memc_cmds_allowed +syn keyword ngxDirectiveThirdParty contained memc_connect_timeout +syn keyword ngxDirectiveThirdParty contained memc_flags_to_last_modified +syn keyword ngxDirectiveThirdParty contained memc_next_upstream +syn keyword ngxDirectiveThirdParty contained memc_pass +syn keyword ngxDirectiveThirdParty contained memc_read_timeout +syn keyword ngxDirectiveThirdParty contained memc_send_timeout +syn keyword ngxDirectiveThirdParty contained memc_upstream_fail_timeout +syn keyword ngxDirectiveThirdParty contained memc_upstream_max_fails " Mod Security Module " ModSecurity is an open source, cross platform web application firewall (WAF) engine -syn keyword ngxDirectiveThirdParty ModSecurityConfig -syn keyword ngxDirectiveThirdParty ModSecurityEnabled -syn keyword ngxDirectiveThirdParty pool_context -syn keyword ngxDirectiveThirdParty pool_context_hash_size +syn keyword ngxDirectiveThirdParty contained ModSecurityConfig +syn keyword ngxDirectiveThirdParty contained ModSecurityEnabled +syn keyword ngxDirectiveThirdParty contained pool_context +syn keyword ngxDirectiveThirdParty contained pool_context_hash_size " Mogilefs Module " MogileFS client for nginx web server. -syn keyword ngxDirectiveThirdParty mogilefs_pass -syn keyword ngxDirectiveThirdParty mogilefs_methods -syn keyword ngxDirectiveThirdParty mogilefs_domain -syn keyword ngxDirectiveThirdParty mogilefs_class -syn keyword ngxDirectiveThirdParty mogilefs_tracker -syn keyword ngxDirectiveThirdParty mogilefs_noverify -syn keyword ngxDirectiveThirdParty mogilefs_connect_timeout -syn keyword ngxDirectiveThirdParty mogilefs_send_timeout -syn keyword ngxDirectiveThirdParty mogilefs_read_timeout +syn keyword ngxDirectiveThirdParty contained mogilefs_pass +syn keyword ngxDirectiveThirdParty contained mogilefs_methods +syn keyword ngxDirectiveThirdParty contained mogilefs_domain +syn keyword ngxDirectiveThirdParty contained mogilefs_class +syn keyword ngxDirectiveThirdParty contained mogilefs_tracker +syn keyword ngxDirectiveThirdParty contained mogilefs_noverify +syn keyword ngxDirectiveThirdParty contained mogilefs_connect_timeout +syn keyword ngxDirectiveThirdParty contained mogilefs_send_timeout +syn keyword ngxDirectiveThirdParty contained mogilefs_read_timeout " Mongo Module " Upstream module that allows nginx to communicate directly with MongoDB database. -syn keyword ngxDirectiveThirdParty mongo_auth -syn keyword ngxDirectiveThirdParty mongo_pass -syn keyword ngxDirectiveThirdParty mongo_query -syn keyword ngxDirectiveThirdParty mongo_json -syn keyword ngxDirectiveThirdParty mongo_bind -syn keyword ngxDirectiveThirdParty mongo_connect_timeout -syn keyword ngxDirectiveThirdParty mongo_send_timeout -syn keyword ngxDirectiveThirdParty mongo_read_timeout -syn keyword ngxDirectiveThirdParty mongo_buffering -syn keyword ngxDirectiveThirdParty mongo_buffer_size -syn keyword ngxDirectiveThirdParty mongo_buffers -syn keyword ngxDirectiveThirdParty mongo_busy_buffers_size -syn keyword ngxDirectiveThirdParty mongo_next_upstream +syn keyword ngxDirectiveThirdParty contained mongo_auth +syn keyword ngxDirectiveThirdParty contained mongo_pass +syn keyword ngxDirectiveThirdParty contained mongo_query +syn keyword ngxDirectiveThirdParty contained mongo_json +syn keyword ngxDirectiveThirdParty contained mongo_bind +syn keyword ngxDirectiveThirdParty contained mongo_connect_timeout +syn keyword ngxDirectiveThirdParty contained mongo_send_timeout +syn keyword ngxDirectiveThirdParty contained mongo_read_timeout +syn keyword ngxDirectiveThirdParty contained mongo_buffering +syn keyword ngxDirectiveThirdParty contained mongo_buffer_size +syn keyword ngxDirectiveThirdParty contained mongo_buffers +syn keyword ngxDirectiveThirdParty contained mongo_busy_buffers_size +syn keyword ngxDirectiveThirdParty contained mongo_next_upstream " MP4 Streaming Lite Module " Will seek to a certain time within H.264/MP4 files when provided with a 'start' parameter in the URL. -" syn keyword ngxDirectiveThirdParty mp4 +" syn keyword ngxDirectiveThirdParty contained mp4 " NAXSI Module " NAXSI is an open-source, high performance, low rules maintenance WAF for NGINX -syn keyword ngxDirectiveThirdParty DeniedUrl denied_url -syn keyword ngxDirectiveThirdParty LearningMode learning_mode -syn keyword ngxDirectiveThirdParty SecRulesEnabled rules_enabled -syn keyword ngxDirectiveThirdParty SecRulesDisabled rules_disabled -syn keyword ngxDirectiveThirdParty CheckRule check_rule -syn keyword ngxDirectiveThirdParty BasicRule basic_rule -syn keyword ngxDirectiveThirdParty MainRule main_rule -syn keyword ngxDirectiveThirdParty LibInjectionSql libinjection_sql -syn keyword ngxDirectiveThirdParty LibInjectionXss libinjection_xss +syn keyword ngxDirectiveThirdParty contained DeniedUrl denied_url +syn keyword ngxDirectiveThirdParty contained LearningMode learning_mode +syn keyword ngxDirectiveThirdParty contained SecRulesEnabled rules_enabled +syn keyword ngxDirectiveThirdParty contained SecRulesDisabled rules_disabled +syn keyword ngxDirectiveThirdParty contained CheckRule check_rule +syn keyword ngxDirectiveThirdParty contained BasicRule basic_rule +syn keyword ngxDirectiveThirdParty contained MainRule main_rule +syn keyword ngxDirectiveThirdParty contained LibInjectionSql libinjection_sql +syn keyword ngxDirectiveThirdParty contained LibInjectionXss libinjection_xss " Nchan Module " Fast, horizontally scalable, multiprocess pub/sub queuing server and proxy for HTTP, long-polling, Websockets and EventSource (SSE) -syn keyword ngxDirectiveThirdParty nchan_channel_id -syn keyword ngxDirectiveThirdParty nchan_channel_id_split_delimiter -syn keyword ngxDirectiveThirdParty nchan_eventsource_event -syn keyword ngxDirectiveThirdParty nchan_longpoll_multipart_response -syn keyword ngxDirectiveThirdParty nchan_publisher -syn keyword ngxDirectiveThirdParty nchan_publisher_channel_id -syn keyword ngxDirectiveThirdParty nchan_publisher_upstream_request -syn keyword ngxDirectiveThirdParty nchan_pubsub -syn keyword ngxDirectiveThirdParty nchan_subscribe_request -syn keyword ngxDirectiveThirdParty nchan_subscriber -syn keyword ngxDirectiveThirdParty nchan_subscriber_channel_id -syn keyword ngxDirectiveThirdParty nchan_subscriber_compound_etag_message_id -syn keyword ngxDirectiveThirdParty nchan_subscriber_first_message -syn keyword ngxDirectiveThirdParty nchan_subscriber_http_raw_stream_separator -syn keyword ngxDirectiveThirdParty nchan_subscriber_last_message_id -syn keyword ngxDirectiveThirdParty nchan_subscriber_message_id_custom_etag_header -syn keyword ngxDirectiveThirdParty nchan_subscriber_timeout -syn keyword ngxDirectiveThirdParty nchan_unsubscribe_request -syn keyword ngxDirectiveThirdParty nchan_websocket_ping_interval -syn keyword ngxDirectiveThirdParty nchan_authorize_request -syn keyword ngxDirectiveThirdParty nchan_max_reserved_memory -syn keyword ngxDirectiveThirdParty nchan_message_buffer_length -syn keyword ngxDirectiveThirdParty nchan_message_timeout -syn keyword ngxDirectiveThirdParty nchan_redis_idle_channel_cache_timeout -syn keyword ngxDirectiveThirdParty nchan_redis_namespace -syn keyword ngxDirectiveThirdParty nchan_redis_pass -syn keyword ngxDirectiveThirdParty nchan_redis_ping_interval -syn keyword ngxDirectiveThirdParty nchan_redis_server -syn keyword ngxDirectiveThirdParty nchan_redis_storage_mode -syn keyword ngxDirectiveThirdParty nchan_redis_url -syn keyword ngxDirectiveThirdParty nchan_store_messages -syn keyword ngxDirectiveThirdParty nchan_use_redis -syn keyword ngxDirectiveThirdParty nchan_access_control_allow_origin -syn keyword ngxDirectiveThirdParty nchan_channel_group -syn keyword ngxDirectiveThirdParty nchan_channel_group_accounting -syn keyword ngxDirectiveThirdParty nchan_group_location -syn keyword ngxDirectiveThirdParty nchan_group_max_channels -syn keyword ngxDirectiveThirdParty nchan_group_max_messages -syn keyword ngxDirectiveThirdParty nchan_group_max_messages_disk -syn keyword ngxDirectiveThirdParty nchan_group_max_messages_memory -syn keyword ngxDirectiveThirdParty nchan_group_max_subscribers -syn keyword ngxDirectiveThirdParty nchan_subscribe_existing_channels_only -syn keyword ngxDirectiveThirdParty nchan_channel_event_string -syn keyword ngxDirectiveThirdParty nchan_channel_events_channel_id -syn keyword ngxDirectiveThirdParty nchan_stub_status -syn keyword ngxDirectiveThirdParty nchan_max_channel_id_length -syn keyword ngxDirectiveThirdParty nchan_max_channel_subscribers -syn keyword ngxDirectiveThirdParty nchan_channel_timeout -syn keyword ngxDirectiveThirdParty nchan_storage_engine +syn keyword ngxDirectiveThirdParty contained nchan_channel_id +syn keyword ngxDirectiveThirdParty contained nchan_channel_id_split_delimiter +syn keyword ngxDirectiveThirdParty contained nchan_eventsource_event +syn keyword ngxDirectiveThirdParty contained nchan_longpoll_multipart_response +syn keyword ngxDirectiveThirdParty contained nchan_publisher +syn keyword ngxDirectiveThirdParty contained nchan_publisher_channel_id +syn keyword ngxDirectiveThirdParty contained nchan_publisher_upstream_request +syn keyword ngxDirectiveThirdParty contained nchan_pubsub +syn keyword ngxDirectiveThirdParty contained nchan_subscribe_request +syn keyword ngxDirectiveThirdParty contained nchan_subscriber +syn keyword ngxDirectiveThirdParty contained nchan_subscriber_channel_id +syn keyword ngxDirectiveThirdParty contained nchan_subscriber_compound_etag_message_id +syn keyword ngxDirectiveThirdParty contained nchan_subscriber_first_message +syn keyword ngxDirectiveThirdParty contained nchan_subscriber_http_raw_stream_separator +syn keyword ngxDirectiveThirdParty contained nchan_subscriber_last_message_id +syn keyword ngxDirectiveThirdParty contained nchan_subscriber_message_id_custom_etag_header +syn keyword ngxDirectiveThirdParty contained nchan_subscriber_timeout +syn keyword ngxDirectiveThirdParty contained nchan_unsubscribe_request +syn keyword ngxDirectiveThirdParty contained nchan_websocket_ping_interval +syn keyword ngxDirectiveThirdParty contained nchan_authorize_request +syn keyword ngxDirectiveThirdParty contained nchan_max_reserved_memory +syn keyword ngxDirectiveThirdParty contained nchan_message_buffer_length +syn keyword ngxDirectiveThirdParty contained nchan_message_timeout +syn keyword ngxDirectiveThirdParty contained nchan_redis_idle_channel_cache_timeout +syn keyword ngxDirectiveThirdParty contained nchan_redis_namespace +syn keyword ngxDirectiveThirdParty contained nchan_redis_pass +syn keyword ngxDirectiveThirdParty contained nchan_redis_ping_interval +syn keyword ngxDirectiveThirdParty contained nchan_redis_server +syn keyword ngxDirectiveThirdParty contained nchan_redis_storage_mode +syn keyword ngxDirectiveThirdParty contained nchan_redis_url +syn keyword ngxDirectiveThirdParty contained nchan_store_messages +syn keyword ngxDirectiveThirdParty contained nchan_use_redis +syn keyword ngxDirectiveThirdParty contained nchan_access_control_allow_origin +syn keyword ngxDirectiveThirdParty contained nchan_channel_group +syn keyword ngxDirectiveThirdParty contained nchan_channel_group_accounting +syn keyword ngxDirectiveThirdParty contained nchan_group_location +syn keyword ngxDirectiveThirdParty contained nchan_group_max_channels +syn keyword ngxDirectiveThirdParty contained nchan_group_max_messages +syn keyword ngxDirectiveThirdParty contained nchan_group_max_messages_disk +syn keyword ngxDirectiveThirdParty contained nchan_group_max_messages_memory +syn keyword ngxDirectiveThirdParty contained nchan_group_max_subscribers +syn keyword ngxDirectiveThirdParty contained nchan_subscribe_existing_channels_only +syn keyword ngxDirectiveThirdParty contained nchan_channel_event_string +syn keyword ngxDirectiveThirdParty contained nchan_channel_events_channel_id +syn keyword ngxDirectiveThirdParty contained nchan_stub_status +syn keyword ngxDirectiveThirdParty contained nchan_max_channel_id_length +syn keyword ngxDirectiveThirdParty contained nchan_max_channel_subscribers +syn keyword ngxDirectiveThirdParty contained nchan_channel_timeout +syn keyword ngxDirectiveThirdParty contained nchan_storage_engine " Nginx Notice Module " Serve static file to POST requests. -syn keyword ngxDirectiveThirdParty notice -syn keyword ngxDirectiveThirdParty notice_type +syn keyword ngxDirectiveThirdParty contained notice +syn keyword ngxDirectiveThirdParty contained notice_type " OCSP Proxy Module " Nginx OCSP processing module designed for response caching -syn keyword ngxDirectiveThirdParty ocsp_proxy -syn keyword ngxDirectiveThirdParty ocsp_cache_timeout +syn keyword ngxDirectiveThirdParty contained ocsp_proxy +syn keyword ngxDirectiveThirdParty contained ocsp_cache_timeout " Eval Module " Module for nginx web server evaluates response of proxy or memcached module into variables. -syn keyword ngxDirectiveThirdParty eval -syn keyword ngxDirectiveThirdParty eval_escalate -syn keyword ngxDirectiveThirdParty eval_buffer_size -syn keyword ngxDirectiveThirdParty eval_override_content_type -syn keyword ngxDirectiveThirdParty eval_subrequest_in_memory +syn keyword ngxDirectiveThirdParty contained eval +syn keyword ngxDirectiveThirdParty contained eval_escalate +syn keyword ngxDirectiveThirdParty contained eval_buffer_size +syn keyword ngxDirectiveThirdParty contained eval_override_content_type +syn keyword ngxDirectiveThirdParty contained eval_subrequest_in_memory " OpenSSL Version Module " Nginx OpenSSL version check at startup -syn keyword ngxDirectiveThirdParty openssl_version_minimum -syn keyword ngxDirectiveThirdParty openssl_builddate_minimum +syn keyword ngxDirectiveThirdParty contained openssl_version_minimum +syn keyword ngxDirectiveThirdParty contained openssl_builddate_minimum " Owner Match Module " Control access for specific owners and groups of files -syn keyword ngxDirectiveThirdParty omallow -syn keyword ngxDirectiveThirdParty omdeny +syn keyword ngxDirectiveThirdParty contained omallow +syn keyword ngxDirectiveThirdParty contained omdeny " Accept Language Module " Parses the Accept-Language header and gives the most suitable locale from a list of supported locales. -syn keyword ngxDirectiveThirdParty pagespeed +syn keyword ngxDirectiveThirdParty contained pagespeed " PHP Memcache Standard Balancer Module " Loadbalancer that is compatible to the standard loadbalancer in the php-memcache module -syn keyword ngxDirectiveThirdParty hash_key +syn keyword ngxDirectiveThirdParty contained hash_key " PHP Session Module " Nginx module to parse php sessions -syn keyword ngxDirectiveThirdParty php_session_parse -syn keyword ngxDirectiveThirdParty php_session_strip_formatting +syn keyword ngxDirectiveThirdParty contained php_session_parse +syn keyword ngxDirectiveThirdParty contained php_session_strip_formatting " Phusion Passenger Module " Passenger is an open source web application server. -syn keyword ngxDirectiveThirdParty passenger_root -syn keyword ngxDirectiveThirdParty passenger_enabled -syn keyword ngxDirectiveThirdParty passenger_base_uri -syn keyword ngxDirectiveThirdParty passenger_document_root -syn keyword ngxDirectiveThirdParty passenger_ruby -syn keyword ngxDirectiveThirdParty passenger_python -syn keyword ngxDirectiveThirdParty passenger_nodejs -syn keyword ngxDirectiveThirdParty passenger_meteor_app_settings -syn keyword ngxDirectiveThirdParty passenger_app_env -syn keyword ngxDirectiveThirdParty passenger_app_root -syn keyword ngxDirectiveThirdParty passenger_app_group_name -syn keyword ngxDirectiveThirdParty passenger_app_type -syn keyword ngxDirectiveThirdParty passenger_startup_file -syn keyword ngxDirectiveThirdParty passenger_restart_dir -syn keyword ngxDirectiveThirdParty passenger_spawn_method -syn keyword ngxDirectiveThirdParty passenger_env_var -syn keyword ngxDirectiveThirdParty passenger_load_shell_envvars -syn keyword ngxDirectiveThirdParty passenger_rolling_restarts -syn keyword ngxDirectiveThirdParty passenger_resist_deployment_errors -syn keyword ngxDirectiveThirdParty passenger_user_switching -syn keyword ngxDirectiveThirdParty passenger_user -syn keyword ngxDirectiveThirdParty passenger_group -syn keyword ngxDirectiveThirdParty passenger_default_user -syn keyword ngxDirectiveThirdParty passenger_default_group -syn keyword ngxDirectiveThirdParty passenger_show_version_in_header -syn keyword ngxDirectiveThirdParty passenger_friendly_error_pages -syn keyword ngxDirectiveThirdParty passenger_disable_security_update_check -syn keyword ngxDirectiveThirdParty passenger_security_update_check_proxy -syn keyword ngxDirectiveThirdParty passenger_max_pool_size -syn keyword ngxDirectiveThirdParty passenger_min_instances -syn keyword ngxDirectiveThirdParty passenger_max_instances -syn keyword ngxDirectiveThirdParty passenger_max_instances_per_app -syn keyword ngxDirectiveThirdParty passenger_pool_idle_time -syn keyword ngxDirectiveThirdParty passenger_max_preloader_idle_time -syn keyword ngxDirectiveThirdParty passenger_force_max_concurrent_requests_per_process -syn keyword ngxDirectiveThirdParty passenger_start_timeout -syn keyword ngxDirectiveThirdParty passenger_concurrency_model -syn keyword ngxDirectiveThirdParty passenger_thread_count -syn keyword ngxDirectiveThirdParty passenger_max_requests -syn keyword ngxDirectiveThirdParty passenger_max_request_time -syn keyword ngxDirectiveThirdParty passenger_memory_limit -syn keyword ngxDirectiveThirdParty passenger_stat_throttle_rate -syn keyword ngxDirectiveThirdParty passenger_core_file_descriptor_ulimit -syn keyword ngxDirectiveThirdParty passenger_app_file_descriptor_ulimit -syn keyword ngxDirectiveThirdParty passenger_pre_start -syn keyword ngxDirectiveThirdParty passenger_set_header -syn keyword ngxDirectiveThirdParty passenger_max_request_queue_size -syn keyword ngxDirectiveThirdParty passenger_request_queue_overflow_status_code -syn keyword ngxDirectiveThirdParty passenger_sticky_sessions -syn keyword ngxDirectiveThirdParty passenger_sticky_sessions_cookie_name -syn keyword ngxDirectiveThirdParty passenger_abort_websockets_on_process_shutdown -syn keyword ngxDirectiveThirdParty passenger_ignore_client_abort -syn keyword ngxDirectiveThirdParty passenger_intercept_errors -syn keyword ngxDirectiveThirdParty passenger_pass_header -syn keyword ngxDirectiveThirdParty passenger_ignore_headers -syn keyword ngxDirectiveThirdParty passenger_headers_hash_bucket_size -syn keyword ngxDirectiveThirdParty passenger_headers_hash_max_size -syn keyword ngxDirectiveThirdParty passenger_buffer_response -syn keyword ngxDirectiveThirdParty passenger_response_buffer_high_watermark -syn keyword ngxDirectiveThirdParty passenger_buffer_size, passenger_buffers, passenger_busy_buffers_size -syn keyword ngxDirectiveThirdParty passenger_socket_backlog -syn keyword ngxDirectiveThirdParty passenger_log_level -syn keyword ngxDirectiveThirdParty passenger_log_file -syn keyword ngxDirectiveThirdParty passenger_file_descriptor_log_file -syn keyword ngxDirectiveThirdParty passenger_debugger -syn keyword ngxDirectiveThirdParty passenger_instance_registry_dir -syn keyword ngxDirectiveThirdParty passenger_data_buffer_dir -syn keyword ngxDirectiveThirdParty passenger_fly_with -syn keyword ngxDirectiveThirdParty union_station_support -syn keyword ngxDirectiveThirdParty union_station_key -syn keyword ngxDirectiveThirdParty union_station_proxy_address -syn keyword ngxDirectiveThirdParty union_station_filter -syn keyword ngxDirectiveThirdParty union_station_gateway_address -syn keyword ngxDirectiveThirdParty union_station_gateway_port -syn keyword ngxDirectiveThirdParty union_station_gateway_cert -syn keyword ngxDirectiveDeprecated rails_spawn_method -syn keyword ngxDirectiveDeprecated passenger_debug_log_file +syn keyword ngxDirectiveThirdParty contained passenger_root +syn keyword ngxDirectiveThirdParty contained passenger_enabled +syn keyword ngxDirectiveThirdParty contained passenger_base_uri +syn keyword ngxDirectiveThirdParty contained passenger_document_root +syn keyword ngxDirectiveThirdParty contained passenger_ruby +syn keyword ngxDirectiveThirdParty contained passenger_python +syn keyword ngxDirectiveThirdParty contained passenger_nodejs +syn keyword ngxDirectiveThirdParty contained passenger_meteor_app_settings +syn keyword ngxDirectiveThirdParty contained passenger_app_env +syn keyword ngxDirectiveThirdParty contained passenger_app_root +syn keyword ngxDirectiveThirdParty contained passenger_app_group_name +syn keyword ngxDirectiveThirdParty contained passenger_app_type +syn keyword ngxDirectiveThirdParty contained passenger_startup_file +syn keyword ngxDirectiveThirdParty contained passenger_restart_dir +syn keyword ngxDirectiveThirdParty contained passenger_spawn_method +syn keyword ngxDirectiveThirdParty contained passenger_env_var +syn keyword ngxDirectiveThirdParty contained passenger_load_shell_envvars +syn keyword ngxDirectiveThirdParty contained passenger_rolling_restarts +syn keyword ngxDirectiveThirdParty contained passenger_resist_deployment_errors +syn keyword ngxDirectiveThirdParty contained passenger_user_switching +syn keyword ngxDirectiveThirdParty contained passenger_user +syn keyword ngxDirectiveThirdParty contained passenger_group +syn keyword ngxDirectiveThirdParty contained passenger_default_user +syn keyword ngxDirectiveThirdParty contained passenger_default_group +syn keyword ngxDirectiveThirdParty contained passenger_show_version_in_header +syn keyword ngxDirectiveThirdParty contained passenger_friendly_error_pages +syn keyword ngxDirectiveThirdParty contained passenger_disable_security_update_check +syn keyword ngxDirectiveThirdParty contained passenger_security_update_check_proxy +syn keyword ngxDirectiveThirdParty contained passenger_max_pool_size +syn keyword ngxDirectiveThirdParty contained passenger_min_instances +syn keyword ngxDirectiveThirdParty contained passenger_max_instances +syn keyword ngxDirectiveThirdParty contained passenger_max_instances_per_app +syn keyword ngxDirectiveThirdParty contained passenger_pool_idle_time +syn keyword ngxDirectiveThirdParty contained passenger_max_preloader_idle_time +syn keyword ngxDirectiveThirdParty contained passenger_force_max_concurrent_requests_per_process +syn keyword ngxDirectiveThirdParty contained passenger_start_timeout +syn keyword ngxDirectiveThirdParty contained passenger_concurrency_model +syn keyword ngxDirectiveThirdParty contained passenger_thread_count +syn keyword ngxDirectiveThirdParty contained passenger_max_requests +syn keyword ngxDirectiveThirdParty contained passenger_max_request_time +syn keyword ngxDirectiveThirdParty contained passenger_memory_limit +syn keyword ngxDirectiveThirdParty contained passenger_stat_throttle_rate +syn keyword ngxDirectiveThirdParty contained passenger_core_file_descriptor_ulimit +syn keyword ngxDirectiveThirdParty contained passenger_app_file_descriptor_ulimit +syn keyword ngxDirectiveThirdParty contained passenger_pre_start +syn keyword ngxDirectiveThirdParty contained passenger_set_header +syn keyword ngxDirectiveThirdParty contained passenger_max_request_queue_size +syn keyword ngxDirectiveThirdParty contained passenger_request_queue_overflow_status_code +syn keyword ngxDirectiveThirdParty contained passenger_sticky_sessions +syn keyword ngxDirectiveThirdParty contained passenger_sticky_sessions_cookie_name +syn keyword ngxDirectiveThirdParty contained passenger_abort_websockets_on_process_shutdown +syn keyword ngxDirectiveThirdParty contained passenger_ignore_client_abort +syn keyword ngxDirectiveThirdParty contained passenger_intercept_errors +syn keyword ngxDirectiveThirdParty contained passenger_pass_header +syn keyword ngxDirectiveThirdParty contained passenger_ignore_headers +syn keyword ngxDirectiveThirdParty contained passenger_headers_hash_bucket_size +syn keyword ngxDirectiveThirdParty contained passenger_headers_hash_max_size +syn keyword ngxDirectiveThirdParty contained passenger_buffer_response +syn keyword ngxDirectiveThirdParty contained passenger_response_buffer_high_watermark +syn keyword ngxDirectiveThirdParty contained passenger_buffer_size, passenger_buffers, passenger_busy_buffers_size +syn keyword ngxDirectiveThirdParty contained passenger_socket_backlog +syn keyword ngxDirectiveThirdParty contained passenger_log_level +syn keyword ngxDirectiveThirdParty contained passenger_log_file +syn keyword ngxDirectiveThirdParty contained passenger_file_descriptor_log_file +syn keyword ngxDirectiveThirdParty contained passenger_debugger +syn keyword ngxDirectiveThirdParty contained passenger_instance_registry_dir +syn keyword ngxDirectiveThirdParty contained passenger_data_buffer_dir +syn keyword ngxDirectiveThirdParty contained passenger_fly_with +syn keyword ngxDirectiveThirdParty contained union_station_support +syn keyword ngxDirectiveThirdParty contained union_station_key +syn keyword ngxDirectiveThirdParty contained union_station_proxy_address +syn keyword ngxDirectiveThirdParty contained union_station_filter +syn keyword ngxDirectiveThirdParty contained union_station_gateway_address +syn keyword ngxDirectiveThirdParty contained union_station_gateway_port +syn keyword ngxDirectiveThirdParty contained union_station_gateway_cert +syn keyword ngxDirectiveDeprecated contained rails_spawn_method +syn keyword ngxDirectiveDeprecated contained passenger_debug_log_file " Postgres Module " Upstream module that allows nginx to communicate directly with PostgreSQL database. -syn keyword ngxDirectiveThirdParty postgres_server -syn keyword ngxDirectiveThirdParty postgres_keepalive -syn keyword ngxDirectiveThirdParty postgres_pass -syn keyword ngxDirectiveThirdParty postgres_query -syn keyword ngxDirectiveThirdParty postgres_rewrite -syn keyword ngxDirectiveThirdParty postgres_output -syn keyword ngxDirectiveThirdParty postgres_set -syn keyword ngxDirectiveThirdParty postgres_escape -syn keyword ngxDirectiveThirdParty postgres_connect_timeout -syn keyword ngxDirectiveThirdParty postgres_result_timeout +syn keyword ngxDirectiveThirdParty contained postgres_server +syn keyword ngxDirectiveThirdParty contained postgres_keepalive +syn keyword ngxDirectiveThirdParty contained postgres_pass +syn keyword ngxDirectiveThirdParty contained postgres_query +syn keyword ngxDirectiveThirdParty contained postgres_rewrite +syn keyword ngxDirectiveThirdParty contained postgres_output +syn keyword ngxDirectiveThirdParty contained postgres_set +syn keyword ngxDirectiveThirdParty contained postgres_escape +syn keyword ngxDirectiveThirdParty contained postgres_connect_timeout +syn keyword ngxDirectiveThirdParty contained postgres_result_timeout " Pubcookie Module " Authorizes users using encrypted cookies -syn keyword ngxDirectiveThirdParty pubcookie_inactive_expire -syn keyword ngxDirectiveThirdParty pubcookie_hard_expire -syn keyword ngxDirectiveThirdParty pubcookie_app_id -syn keyword ngxDirectiveThirdParty pubcookie_dir_depth -syn keyword ngxDirectiveThirdParty pubcookie_catenate_app_ids -syn keyword ngxDirectiveThirdParty pubcookie_app_srv_id -syn keyword ngxDirectiveThirdParty pubcookie_login -syn keyword ngxDirectiveThirdParty pubcookie_login_method -syn keyword ngxDirectiveThirdParty pubcookie_post -syn keyword ngxDirectiveThirdParty pubcookie_domain -syn keyword ngxDirectiveThirdParty pubcookie_granting_cert_file -syn keyword ngxDirectiveThirdParty pubcookie_session_key_file -syn keyword ngxDirectiveThirdParty pubcookie_session_cert_file -syn keyword ngxDirectiveThirdParty pubcookie_crypt_key_file -syn keyword ngxDirectiveThirdParty pubcookie_end_session -syn keyword ngxDirectiveThirdParty pubcookie_encryption -syn keyword ngxDirectiveThirdParty pubcookie_session_reauth -syn keyword ngxDirectiveThirdParty pubcookie_auth_type_names -syn keyword ngxDirectiveThirdParty pubcookie_no_prompt -syn keyword ngxDirectiveThirdParty pubcookie_on_demand -syn keyword ngxDirectiveThirdParty pubcookie_addl_request -syn keyword ngxDirectiveThirdParty pubcookie_no_obscure_cookies -syn keyword ngxDirectiveThirdParty pubcookie_no_clean_creds -syn keyword ngxDirectiveThirdParty pubcookie_egd_device -syn keyword ngxDirectiveThirdParty pubcookie_no_blank -syn keyword ngxDirectiveThirdParty pubcookie_super_debug -syn keyword ngxDirectiveThirdParty pubcookie_set_remote_user +syn keyword ngxDirectiveThirdParty contained pubcookie_inactive_expire +syn keyword ngxDirectiveThirdParty contained pubcookie_hard_expire +syn keyword ngxDirectiveThirdParty contained pubcookie_app_id +syn keyword ngxDirectiveThirdParty contained pubcookie_dir_depth +syn keyword ngxDirectiveThirdParty contained pubcookie_catenate_app_ids +syn keyword ngxDirectiveThirdParty contained pubcookie_app_srv_id +syn keyword ngxDirectiveThirdParty contained pubcookie_login +syn keyword ngxDirectiveThirdParty contained pubcookie_login_method +syn keyword ngxDirectiveThirdParty contained pubcookie_post +syn keyword ngxDirectiveThirdParty contained pubcookie_domain +syn keyword ngxDirectiveThirdParty contained pubcookie_granting_cert_file +syn keyword ngxDirectiveThirdParty contained pubcookie_session_key_file +syn keyword ngxDirectiveThirdParty contained pubcookie_session_cert_file +syn keyword ngxDirectiveThirdParty contained pubcookie_crypt_key_file +syn keyword ngxDirectiveThirdParty contained pubcookie_end_session +syn keyword ngxDirectiveThirdParty contained pubcookie_encryption +syn keyword ngxDirectiveThirdParty contained pubcookie_session_reauth +syn keyword ngxDirectiveThirdParty contained pubcookie_auth_type_names +syn keyword ngxDirectiveThirdParty contained pubcookie_no_prompt +syn keyword ngxDirectiveThirdParty contained pubcookie_on_demand +syn keyword ngxDirectiveThirdParty contained pubcookie_addl_request +syn keyword ngxDirectiveThirdParty contained pubcookie_no_obscure_cookies +syn keyword ngxDirectiveThirdParty contained pubcookie_no_clean_creds +syn keyword ngxDirectiveThirdParty contained pubcookie_egd_device +syn keyword ngxDirectiveThirdParty contained pubcookie_no_blank +syn keyword ngxDirectiveThirdParty contained pubcookie_super_debug +syn keyword ngxDirectiveThirdParty contained pubcookie_set_remote_user " Push Stream Module " A pure stream http push technology for your Nginx setup -syn keyword ngxDirectiveThirdParty push_stream_channels_statistics -syn keyword ngxDirectiveThirdParty push_stream_publisher -syn keyword ngxDirectiveThirdParty push_stream_subscriber -syn keyword ngxDirectiveThirdParty push_stream_shared_memory_size -syn keyword ngxDirectiveThirdParty push_stream_channel_deleted_message_text -syn keyword ngxDirectiveThirdParty push_stream_channel_inactivity_time -syn keyword ngxDirectiveThirdParty push_stream_ping_message_text -syn keyword ngxDirectiveThirdParty push_stream_timeout_with_body -syn keyword ngxDirectiveThirdParty push_stream_message_ttl -syn keyword ngxDirectiveThirdParty push_stream_max_subscribers_per_channel -syn keyword ngxDirectiveThirdParty push_stream_max_messages_stored_per_channel -syn keyword ngxDirectiveThirdParty push_stream_max_channel_id_length -syn keyword ngxDirectiveThirdParty push_stream_max_number_of_channels -syn keyword ngxDirectiveThirdParty push_stream_max_number_of_wildcard_channels -syn keyword ngxDirectiveThirdParty push_stream_wildcard_channel_prefix -syn keyword ngxDirectiveThirdParty push_stream_events_channel_id -syn keyword ngxDirectiveThirdParty push_stream_channels_path -syn keyword ngxDirectiveThirdParty push_stream_store_messages -syn keyword ngxDirectiveThirdParty push_stream_channel_info_on_publish -syn keyword ngxDirectiveThirdParty push_stream_authorized_channels_only -syn keyword ngxDirectiveThirdParty push_stream_header_template_file -syn keyword ngxDirectiveThirdParty push_stream_header_template -syn keyword ngxDirectiveThirdParty push_stream_message_template -syn keyword ngxDirectiveThirdParty push_stream_footer_template -syn keyword ngxDirectiveThirdParty push_stream_wildcard_channel_max_qtd -syn keyword ngxDirectiveThirdParty push_stream_ping_message_interval -syn keyword ngxDirectiveThirdParty push_stream_subscriber_connection_ttl -syn keyword ngxDirectiveThirdParty push_stream_longpolling_connection_ttl -syn keyword ngxDirectiveThirdParty push_stream_websocket_allow_publish -syn keyword ngxDirectiveThirdParty push_stream_last_received_message_time -syn keyword ngxDirectiveThirdParty push_stream_last_received_message_tag -syn keyword ngxDirectiveThirdParty push_stream_last_event_id -syn keyword ngxDirectiveThirdParty push_stream_user_agent -syn keyword ngxDirectiveThirdParty push_stream_padding_by_user_agent -syn keyword ngxDirectiveThirdParty push_stream_allowed_origins -syn keyword ngxDirectiveThirdParty push_stream_allow_connections_to_events_channel +syn keyword ngxDirectiveThirdParty contained push_stream_channels_statistics +syn keyword ngxDirectiveThirdParty contained push_stream_publisher +syn keyword ngxDirectiveThirdParty contained push_stream_subscriber +syn keyword ngxDirectiveThirdParty contained push_stream_shared_memory_size +syn keyword ngxDirectiveThirdParty contained push_stream_channel_deleted_message_text +syn keyword ngxDirectiveThirdParty contained push_stream_channel_inactivity_time +syn keyword ngxDirectiveThirdParty contained push_stream_ping_message_text +syn keyword ngxDirectiveThirdParty contained push_stream_timeout_with_body +syn keyword ngxDirectiveThirdParty contained push_stream_message_ttl +syn keyword ngxDirectiveThirdParty contained push_stream_max_subscribers_per_channel +syn keyword ngxDirectiveThirdParty contained push_stream_max_messages_stored_per_channel +syn keyword ngxDirectiveThirdParty contained push_stream_max_channel_id_length +syn keyword ngxDirectiveThirdParty contained push_stream_max_number_of_channels +syn keyword ngxDirectiveThirdParty contained push_stream_max_number_of_wildcard_channels +syn keyword ngxDirectiveThirdParty contained push_stream_wildcard_channel_prefix +syn keyword ngxDirectiveThirdParty contained push_stream_events_channel_id +syn keyword ngxDirectiveThirdParty contained push_stream_channels_path +syn keyword ngxDirectiveThirdParty contained push_stream_store_messages +syn keyword ngxDirectiveThirdParty contained push_stream_channel_info_on_publish +syn keyword ngxDirectiveThirdParty contained push_stream_authorized_channels_only +syn keyword ngxDirectiveThirdParty contained push_stream_header_template_file +syn keyword ngxDirectiveThirdParty contained push_stream_header_template +syn keyword ngxDirectiveThirdParty contained push_stream_message_template +syn keyword ngxDirectiveThirdParty contained push_stream_footer_template +syn keyword ngxDirectiveThirdParty contained push_stream_wildcard_channel_max_qtd +syn keyword ngxDirectiveThirdParty contained push_stream_ping_message_interval +syn keyword ngxDirectiveThirdParty contained push_stream_subscriber_connection_ttl +syn keyword ngxDirectiveThirdParty contained push_stream_longpolling_connection_ttl +syn keyword ngxDirectiveThirdParty contained push_stream_websocket_allow_publish +syn keyword ngxDirectiveThirdParty contained push_stream_last_received_message_time +syn keyword ngxDirectiveThirdParty contained push_stream_last_received_message_tag +syn keyword ngxDirectiveThirdParty contained push_stream_last_event_id +syn keyword ngxDirectiveThirdParty contained push_stream_user_agent +syn keyword ngxDirectiveThirdParty contained push_stream_padding_by_user_agent +syn keyword ngxDirectiveThirdParty contained push_stream_allowed_origins +syn keyword ngxDirectiveThirdParty contained push_stream_allow_connections_to_events_channel " rDNS Module " Make a reverse DNS (rDNS) lookup for incoming connection and provides simple access control of incoming hostname by allow/deny rules -syn keyword ngxDirectiveThirdParty rdns -syn keyword ngxDirectiveThirdParty rdns_allow -syn keyword ngxDirectiveThirdParty rdns_deny +syn keyword ngxDirectiveThirdParty contained rdns +syn keyword ngxDirectiveThirdParty contained rdns_allow +syn keyword ngxDirectiveThirdParty contained rdns_deny " RDS CSV Module " Nginx output filter module to convert Resty-DBD-Streams (RDS) to Comma-Separated Values (CSV) -syn keyword ngxDirectiveThirdParty rds_csv -syn keyword ngxDirectiveThirdParty rds_csv_row_terminator -syn keyword ngxDirectiveThirdParty rds_csv_field_separator -syn keyword ngxDirectiveThirdParty rds_csv_field_name_header -syn keyword ngxDirectiveThirdParty rds_csv_content_type -syn keyword ngxDirectiveThirdParty rds_csv_buffer_size +syn keyword ngxDirectiveThirdParty contained rds_csv +syn keyword ngxDirectiveThirdParty contained rds_csv_row_terminator +syn keyword ngxDirectiveThirdParty contained rds_csv_field_separator +syn keyword ngxDirectiveThirdParty contained rds_csv_field_name_header +syn keyword ngxDirectiveThirdParty contained rds_csv_content_type +syn keyword ngxDirectiveThirdParty contained rds_csv_buffer_size " RDS JSON Module " An output filter that formats Resty DBD Streams generated by ngx_drizzle and others to JSON -syn keyword ngxDirectiveThirdParty rds_json -syn keyword ngxDirectiveThirdParty rds_json_buffer_size -syn keyword ngxDirectiveThirdParty rds_json_format -syn keyword ngxDirectiveThirdParty rds_json_root -syn keyword ngxDirectiveThirdParty rds_json_success_property -syn keyword ngxDirectiveThirdParty rds_json_user_property -syn keyword ngxDirectiveThirdParty rds_json_errcode_key -syn keyword ngxDirectiveThirdParty rds_json_errstr_key -syn keyword ngxDirectiveThirdParty rds_json_ret -syn keyword ngxDirectiveThirdParty rds_json_content_type +syn keyword ngxDirectiveThirdParty contained rds_json +syn keyword ngxDirectiveThirdParty contained rds_json_buffer_size +syn keyword ngxDirectiveThirdParty contained rds_json_format +syn keyword ngxDirectiveThirdParty contained rds_json_root +syn keyword ngxDirectiveThirdParty contained rds_json_success_property +syn keyword ngxDirectiveThirdParty contained rds_json_user_property +syn keyword ngxDirectiveThirdParty contained rds_json_errcode_key +syn keyword ngxDirectiveThirdParty contained rds_json_errstr_key +syn keyword ngxDirectiveThirdParty contained rds_json_ret +syn keyword ngxDirectiveThirdParty contained rds_json_content_type " Redis Module " Use this module to perform simple caching -syn keyword ngxDirectiveThirdParty redis_pass -syn keyword ngxDirectiveThirdParty redis_bind -syn keyword ngxDirectiveThirdParty redis_connect_timeout -syn keyword ngxDirectiveThirdParty redis_read_timeout -syn keyword ngxDirectiveThirdParty redis_send_timeout -syn keyword ngxDirectiveThirdParty redis_buffer_size -syn keyword ngxDirectiveThirdParty redis_next_upstream -syn keyword ngxDirectiveThirdParty redis_gzip_flag +syn keyword ngxDirectiveThirdParty contained redis_pass +syn keyword ngxDirectiveThirdParty contained redis_bind +syn keyword ngxDirectiveThirdParty contained redis_connect_timeout +syn keyword ngxDirectiveThirdParty contained redis_read_timeout +syn keyword ngxDirectiveThirdParty contained redis_send_timeout +syn keyword ngxDirectiveThirdParty contained redis_buffer_size +syn keyword ngxDirectiveThirdParty contained redis_next_upstream +syn keyword ngxDirectiveThirdParty contained redis_gzip_flag " Redis 2 Module " Nginx upstream module for the Redis 2.0 protocol -syn keyword ngxDirectiveThirdParty redis2_query -syn keyword ngxDirectiveThirdParty redis2_raw_query -syn keyword ngxDirectiveThirdParty redis2_raw_queries -syn keyword ngxDirectiveThirdParty redis2_literal_raw_query -syn keyword ngxDirectiveThirdParty redis2_pass -syn keyword ngxDirectiveThirdParty redis2_connect_timeout -syn keyword ngxDirectiveThirdParty redis2_send_timeout -syn keyword ngxDirectiveThirdParty redis2_read_timeout -syn keyword ngxDirectiveThirdParty redis2_buffer_size -syn keyword ngxDirectiveThirdParty redis2_next_upstream +syn keyword ngxDirectiveThirdParty contained redis2_query +syn keyword ngxDirectiveThirdParty contained redis2_raw_query +syn keyword ngxDirectiveThirdParty contained redis2_raw_queries +syn keyword ngxDirectiveThirdParty contained redis2_literal_raw_query +syn keyword ngxDirectiveThirdParty contained redis2_pass +syn keyword ngxDirectiveThirdParty contained redis2_connect_timeout +syn keyword ngxDirectiveThirdParty contained redis2_send_timeout +syn keyword ngxDirectiveThirdParty contained redis2_read_timeout +syn keyword ngxDirectiveThirdParty contained redis2_buffer_size +syn keyword ngxDirectiveThirdParty contained redis2_next_upstream " Replace Filter Module " Streaming regular expression replacement in response bodies -syn keyword ngxDirectiveThirdParty replace_filter -syn keyword ngxDirectiveThirdParty replace_filter_types -syn keyword ngxDirectiveThirdParty replace_filter_max_buffered_size -syn keyword ngxDirectiveThirdParty replace_filter_last_modified -syn keyword ngxDirectiveThirdParty replace_filter_skip +syn keyword ngxDirectiveThirdParty contained replace_filter +syn keyword ngxDirectiveThirdParty contained replace_filter_types +syn keyword ngxDirectiveThirdParty contained replace_filter_max_buffered_size +syn keyword ngxDirectiveThirdParty contained replace_filter_last_modified +syn keyword ngxDirectiveThirdParty contained replace_filter_skip " Roboo Module " HTTP Robot Mitigator " RRD Graph Module " This module provides an HTTP interface to RRDtool's graphing facilities. -syn keyword ngxDirectiveThirdParty rrd_graph -syn keyword ngxDirectiveThirdParty rrd_graph_root +syn keyword ngxDirectiveThirdParty contained rrd_graph +syn keyword ngxDirectiveThirdParty contained rrd_graph_root " RTMP Module " NGINX-based Media Streaming Server -syn keyword ngxDirectiveThirdParty rtmp -" syn keyword ngxDirectiveThirdParty server -" syn keyword ngxDirectiveThirdParty listen -syn keyword ngxDirectiveThirdParty application -" syn keyword ngxDirectiveThirdParty timeout -syn keyword ngxDirectiveThirdParty ping -syn keyword ngxDirectiveThirdParty ping_timeout -syn keyword ngxDirectiveThirdParty max_streams -syn keyword ngxDirectiveThirdParty ack_window -syn keyword ngxDirectiveThirdParty chunk_size -syn keyword ngxDirectiveThirdParty max_queue -syn keyword ngxDirectiveThirdParty max_message -syn keyword ngxDirectiveThirdParty out_queue -syn keyword ngxDirectiveThirdParty out_cork -" syn keyword ngxDirectiveThirdParty allow -" syn keyword ngxDirectiveThirdParty deny -syn keyword ngxDirectiveThirdParty exec_push -syn keyword ngxDirectiveThirdParty exec_pull -syn keyword ngxDirectiveThirdParty exec -syn keyword ngxDirectiveThirdParty exec_options -syn keyword ngxDirectiveThirdParty exec_static -syn keyword ngxDirectiveThirdParty exec_kill_signal -syn keyword ngxDirectiveThirdParty respawn -syn keyword ngxDirectiveThirdParty respawn_timeout -syn keyword ngxDirectiveThirdParty exec_publish -syn keyword ngxDirectiveThirdParty exec_play -syn keyword ngxDirectiveThirdParty exec_play_done -syn keyword ngxDirectiveThirdParty exec_publish_done -syn keyword ngxDirectiveThirdParty exec_record_done -syn keyword ngxDirectiveThirdParty live -syn keyword ngxDirectiveThirdParty meta -syn keyword ngxDirectiveThirdParty interleave -syn keyword ngxDirectiveThirdParty wait_key -syn keyword ngxDirectiveThirdParty wait_video -syn keyword ngxDirectiveThirdParty publish_notify -syn keyword ngxDirectiveThirdParty drop_idle_publisher -syn keyword ngxDirectiveThirdParty sync -syn keyword ngxDirectiveThirdParty play_restart -syn keyword ngxDirectiveThirdParty idle_streams -syn keyword ngxDirectiveThirdParty record -syn keyword ngxDirectiveThirdParty record_path -syn keyword ngxDirectiveThirdParty record_suffix -syn keyword ngxDirectiveThirdParty record_unique -syn keyword ngxDirectiveThirdParty record_append -syn keyword ngxDirectiveThirdParty record_lock -syn keyword ngxDirectiveThirdParty record_max_size -syn keyword ngxDirectiveThirdParty record_max_frames -syn keyword ngxDirectiveThirdParty record_interval -syn keyword ngxDirectiveThirdParty recorder -syn keyword ngxDirectiveThirdParty record_notify -syn keyword ngxDirectiveThirdParty play -syn keyword ngxDirectiveThirdParty play_temp_path -syn keyword ngxDirectiveThirdParty play_local_path -syn keyword ngxDirectiveThirdParty pull -syn keyword ngxDirectiveThirdParty push -syn keyword ngxDirectiveThirdParty push_reconnect -syn keyword ngxDirectiveThirdParty session_relay -syn keyword ngxDirectiveThirdParty on_connect -syn keyword ngxDirectiveThirdParty on_play -syn keyword ngxDirectiveThirdParty on_publish -syn keyword ngxDirectiveThirdParty on_done -syn keyword ngxDirectiveThirdParty on_play_done -syn keyword ngxDirectiveThirdParty on_publish_done -syn keyword ngxDirectiveThirdParty on_record_done -syn keyword ngxDirectiveThirdParty on_update -syn keyword ngxDirectiveThirdParty notify_update_timeout -syn keyword ngxDirectiveThirdParty notify_update_strict -syn keyword ngxDirectiveThirdParty notify_relay_redirect -syn keyword ngxDirectiveThirdParty notify_method -syn keyword ngxDirectiveThirdParty hls -syn keyword ngxDirectiveThirdParty hls_path -syn keyword ngxDirectiveThirdParty hls_fragment -syn keyword ngxDirectiveThirdParty hls_playlist_length -syn keyword ngxDirectiveThirdParty hls_sync -syn keyword ngxDirectiveThirdParty hls_continuous -syn keyword ngxDirectiveThirdParty hls_nested -syn keyword ngxDirectiveThirdParty hls_base_url -syn keyword ngxDirectiveThirdParty hls_cleanup -syn keyword ngxDirectiveThirdParty hls_fragment_naming -syn keyword ngxDirectiveThirdParty hls_fragment_slicing -syn keyword ngxDirectiveThirdParty hls_variant -syn keyword ngxDirectiveThirdParty hls_type -syn keyword ngxDirectiveThirdParty hls_keys -syn keyword ngxDirectiveThirdParty hls_key_path -syn keyword ngxDirectiveThirdParty hls_key_url -syn keyword ngxDirectiveThirdParty hls_fragments_per_key -syn keyword ngxDirectiveThirdParty dash -syn keyword ngxDirectiveThirdParty dash_path -syn keyword ngxDirectiveThirdParty dash_fragment -syn keyword ngxDirectiveThirdParty dash_playlist_length -syn keyword ngxDirectiveThirdParty dash_nested -syn keyword ngxDirectiveThirdParty dash_cleanup -" syn keyword ngxDirectiveThirdParty access_log -" syn keyword ngxDirectiveThirdParty log_format -syn keyword ngxDirectiveThirdParty max_connections -syn keyword ngxDirectiveThirdParty rtmp_stat -syn keyword ngxDirectiveThirdParty rtmp_stat_stylesheet -syn keyword ngxDirectiveThirdParty rtmp_auto_push -syn keyword ngxDirectiveThirdParty rtmp_auto_push_reconnect -syn keyword ngxDirectiveThirdParty rtmp_socket_dir -syn keyword ngxDirectiveThirdParty rtmp_control +syn keyword ngxDirectiveThirdParty contained rtmp +" syn keyword ngxDirectiveThirdParty contained server +" syn keyword ngxDirectiveThirdParty contained listen +syn keyword ngxDirectiveThirdParty contained application +" syn keyword ngxDirectiveThirdParty contained timeout +syn keyword ngxDirectiveThirdParty contained ping +syn keyword ngxDirectiveThirdParty contained ping_timeout +syn keyword ngxDirectiveThirdParty contained max_streams +syn keyword ngxDirectiveThirdParty contained ack_window +syn keyword ngxDirectiveThirdParty contained chunk_size +syn keyword ngxDirectiveThirdParty contained max_queue +syn keyword ngxDirectiveThirdParty contained max_message +syn keyword ngxDirectiveThirdParty contained out_queue +syn keyword ngxDirectiveThirdParty contained out_cork +" syn keyword ngxDirectiveThirdParty contained allow +" syn keyword ngxDirectiveThirdParty contained deny +syn keyword ngxDirectiveThirdParty contained exec_push +syn keyword ngxDirectiveThirdParty contained exec_pull +syn keyword ngxDirectiveThirdParty contained exec +syn keyword ngxDirectiveThirdParty contained exec_options +syn keyword ngxDirectiveThirdParty contained exec_static +syn keyword ngxDirectiveThirdParty contained exec_kill_signal +syn keyword ngxDirectiveThirdParty contained respawn +syn keyword ngxDirectiveThirdParty contained respawn_timeout +syn keyword ngxDirectiveThirdParty contained exec_publish +syn keyword ngxDirectiveThirdParty contained exec_play +syn keyword ngxDirectiveThirdParty contained exec_play_done +syn keyword ngxDirectiveThirdParty contained exec_publish_done +syn keyword ngxDirectiveThirdParty contained exec_record_done +syn keyword ngxDirectiveThirdParty contained live +syn keyword ngxDirectiveThirdParty contained meta +syn keyword ngxDirectiveThirdParty contained interleave +syn keyword ngxDirectiveThirdParty contained wait_key +syn keyword ngxDirectiveThirdParty contained wait_video +syn keyword ngxDirectiveThirdParty contained publish_notify +syn keyword ngxDirectiveThirdParty contained drop_idle_publisher +syn keyword ngxDirectiveThirdParty contained sync +syn keyword ngxDirectiveThirdParty contained play_restart +syn keyword ngxDirectiveThirdParty contained idle_streams +syn keyword ngxDirectiveThirdParty contained record +syn keyword ngxDirectiveThirdParty contained record_path +syn keyword ngxDirectiveThirdParty contained record_suffix +syn keyword ngxDirectiveThirdParty contained record_unique +syn keyword ngxDirectiveThirdParty contained record_append +syn keyword ngxDirectiveThirdParty contained record_lock +syn keyword ngxDirectiveThirdParty contained record_max_size +syn keyword ngxDirectiveThirdParty contained record_max_frames +syn keyword ngxDirectiveThirdParty contained record_interval +syn keyword ngxDirectiveThirdParty contained recorder +syn keyword ngxDirectiveThirdParty contained record_notify +syn keyword ngxDirectiveThirdParty contained play +syn keyword ngxDirectiveThirdParty contained play_temp_path +syn keyword ngxDirectiveThirdParty contained play_local_path +syn keyword ngxDirectiveThirdParty contained pull +syn keyword ngxDirectiveThirdParty contained push +syn keyword ngxDirectiveThirdParty contained push_reconnect +syn keyword ngxDirectiveThirdParty contained session_relay +syn keyword ngxDirectiveThirdParty contained on_connect +syn keyword ngxDirectiveThirdParty contained on_play +syn keyword ngxDirectiveThirdParty contained on_publish +syn keyword ngxDirectiveThirdParty contained on_done +syn keyword ngxDirectiveThirdParty contained on_play_done +syn keyword ngxDirectiveThirdParty contained on_publish_done +syn keyword ngxDirectiveThirdParty contained on_record_done +syn keyword ngxDirectiveThirdParty contained on_update +syn keyword ngxDirectiveThirdParty contained notify_update_timeout +syn keyword ngxDirectiveThirdParty contained notify_update_strict +syn keyword ngxDirectiveThirdParty contained notify_relay_redirect +syn keyword ngxDirectiveThirdParty contained notify_method +syn keyword ngxDirectiveThirdParty contained hls +syn keyword ngxDirectiveThirdParty contained hls_path +syn keyword ngxDirectiveThirdParty contained hls_fragment +syn keyword ngxDirectiveThirdParty contained hls_playlist_length +syn keyword ngxDirectiveThirdParty contained hls_sync +syn keyword ngxDirectiveThirdParty contained hls_continuous +syn keyword ngxDirectiveThirdParty contained hls_nested +syn keyword ngxDirectiveThirdParty contained hls_base_url +syn keyword ngxDirectiveThirdParty contained hls_cleanup +syn keyword ngxDirectiveThirdParty contained hls_fragment_naming +syn keyword ngxDirectiveThirdParty contained hls_fragment_slicing +syn keyword ngxDirectiveThirdParty contained hls_variant +syn keyword ngxDirectiveThirdParty contained hls_type +syn keyword ngxDirectiveThirdParty contained hls_keys +syn keyword ngxDirectiveThirdParty contained hls_key_path +syn keyword ngxDirectiveThirdParty contained hls_key_url +syn keyword ngxDirectiveThirdParty contained hls_fragments_per_key +syn keyword ngxDirectiveThirdParty contained dash +syn keyword ngxDirectiveThirdParty contained dash_path +syn keyword ngxDirectiveThirdParty contained dash_fragment +syn keyword ngxDirectiveThirdParty contained dash_playlist_length +syn keyword ngxDirectiveThirdParty contained dash_nested +syn keyword ngxDirectiveThirdParty contained dash_cleanup +" syn keyword ngxDirectiveThirdParty contained access_log +" syn keyword ngxDirectiveThirdParty contained log_format +syn keyword ngxDirectiveThirdParty contained max_connections +syn keyword ngxDirectiveThirdParty contained rtmp_stat +syn keyword ngxDirectiveThirdParty contained rtmp_stat_stylesheet +syn keyword ngxDirectiveThirdParty contained rtmp_auto_push +syn keyword ngxDirectiveThirdParty contained rtmp_auto_push_reconnect +syn keyword ngxDirectiveThirdParty contained rtmp_socket_dir +syn keyword ngxDirectiveThirdParty contained rtmp_control " RTMPT Module " Module for nginx to proxy rtmp using http protocol -syn keyword ngxDirectiveThirdParty rtmpt_proxy_target -syn keyword ngxDirectiveThirdParty rtmpt_proxy_rtmp_timeout -syn keyword ngxDirectiveThirdParty rtmpt_proxy_http_timeout -syn keyword ngxDirectiveThirdParty rtmpt_proxy -syn keyword ngxDirectiveThirdParty rtmpt_proxy_stat -syn keyword ngxDirectiveThirdParty rtmpt_proxy_stylesheet +syn keyword ngxDirectiveThirdParty contained rtmpt_proxy_target +syn keyword ngxDirectiveThirdParty contained rtmpt_proxy_rtmp_timeout +syn keyword ngxDirectiveThirdParty contained rtmpt_proxy_http_timeout +syn keyword ngxDirectiveThirdParty contained rtmpt_proxy +syn keyword ngxDirectiveThirdParty contained rtmpt_proxy_stat +syn keyword ngxDirectiveThirdParty contained rtmpt_proxy_stylesheet " Syntactically Awesome Module " Providing on-the-fly compiling of Sass files as an NGINX module. -syn keyword ngxDirectiveThirdParty sass_compile -syn keyword ngxDirectiveThirdParty sass_error_log -syn keyword ngxDirectiveThirdParty sass_include_path -syn keyword ngxDirectiveThirdParty sass_indent -syn keyword ngxDirectiveThirdParty sass_is_indented_syntax -syn keyword ngxDirectiveThirdParty sass_linefeed -syn keyword ngxDirectiveThirdParty sass_precision -syn keyword ngxDirectiveThirdParty sass_output_style -syn keyword ngxDirectiveThirdParty sass_source_comments -syn keyword ngxDirectiveThirdParty sass_source_map_embed +syn keyword ngxDirectiveThirdParty contained sass_compile +syn keyword ngxDirectiveThirdParty contained sass_error_log +syn keyword ngxDirectiveThirdParty contained sass_include_path +syn keyword ngxDirectiveThirdParty contained sass_indent +syn keyword ngxDirectiveThirdParty contained sass_is_indented_syntax +syn keyword ngxDirectiveThirdParty contained sass_linefeed +syn keyword ngxDirectiveThirdParty contained sass_precision +syn keyword ngxDirectiveThirdParty contained sass_output_style +syn keyword ngxDirectiveThirdParty contained sass_source_comments +syn keyword ngxDirectiveThirdParty contained sass_source_map_embed " Secure Download Module " Enables you to create links which are only valid until a certain datetime is reached -syn keyword ngxDirectiveThirdParty secure_download -syn keyword ngxDirectiveThirdParty secure_download_secret -syn keyword ngxDirectiveThirdParty secure_download_path_mode +syn keyword ngxDirectiveThirdParty contained secure_download +syn keyword ngxDirectiveThirdParty contained secure_download_secret +syn keyword ngxDirectiveThirdParty contained secure_download_path_mode " Selective Cache Purge Module " A module to purge cache by GLOB patterns. The supported patterns are the same as supported by Redis. -syn keyword ngxDirectiveThirdParty selective_cache_purge_redis_unix_socket -syn keyword ngxDirectiveThirdParty selective_cache_purge_redis_host -syn keyword ngxDirectiveThirdParty selective_cache_purge_redis_port -syn keyword ngxDirectiveThirdParty selective_cache_purge_redis_database -syn keyword ngxDirectiveThirdParty selective_cache_purge_query +syn keyword ngxDirectiveThirdParty contained selective_cache_purge_redis_unix_socket +syn keyword ngxDirectiveThirdParty contained selective_cache_purge_redis_host +syn keyword ngxDirectiveThirdParty contained selective_cache_purge_redis_port +syn keyword ngxDirectiveThirdParty contained selective_cache_purge_redis_database +syn keyword ngxDirectiveThirdParty contained selective_cache_purge_query " Set cconv Module " Cconv rewrite set commands -syn keyword ngxDirectiveThirdParty set_cconv_to_simp -syn keyword ngxDirectiveThirdParty set_cconv_to_trad -syn keyword ngxDirectiveThirdParty set_pinyin_to_normal +syn keyword ngxDirectiveThirdParty contained set_cconv_to_simp +syn keyword ngxDirectiveThirdParty contained set_cconv_to_trad +syn keyword ngxDirectiveThirdParty contained set_pinyin_to_normal " Set Hash Module " Nginx module that allows the setting of variables to the value of a variety of hashes -syn keyword ngxDirectiveThirdParty set_md5 -syn keyword ngxDirectiveThirdParty set_md5_upper -syn keyword ngxDirectiveThirdParty set_murmur2 -syn keyword ngxDirectiveThirdParty set_murmur2_upper -syn keyword ngxDirectiveThirdParty set_sha1 -syn keyword ngxDirectiveThirdParty set_sha1_upper +syn keyword ngxDirectiveThirdParty contained set_md5 +syn keyword ngxDirectiveThirdParty contained set_md5_upper +syn keyword ngxDirectiveThirdParty contained set_murmur2 +syn keyword ngxDirectiveThirdParty contained set_murmur2_upper +syn keyword ngxDirectiveThirdParty contained set_sha1 +syn keyword ngxDirectiveThirdParty contained set_sha1_upper " Set Lang Module " Provides a variety of ways for setting a variable denoting the langauge that content should be returned in. -syn keyword ngxDirectiveThirdParty set_lang -syn keyword ngxDirectiveThirdParty set_lang_method -syn keyword ngxDirectiveThirdParty lang_cookie -syn keyword ngxDirectiveThirdParty lang_get_var -syn keyword ngxDirectiveThirdParty lang_list -syn keyword ngxDirectiveThirdParty lang_post_var -syn keyword ngxDirectiveThirdParty lang_host -syn keyword ngxDirectiveThirdParty lang_referer +syn keyword ngxDirectiveThirdParty contained set_lang +syn keyword ngxDirectiveThirdParty contained set_lang_method +syn keyword ngxDirectiveThirdParty contained lang_cookie +syn keyword ngxDirectiveThirdParty contained lang_get_var +syn keyword ngxDirectiveThirdParty contained lang_list +syn keyword ngxDirectiveThirdParty contained lang_post_var +syn keyword ngxDirectiveThirdParty contained lang_host +syn keyword ngxDirectiveThirdParty contained lang_referer " Set Misc Module " Various set_xxx directives added to nginx's rewrite module -syn keyword ngxDirectiveThirdParty set_if_empty -syn keyword ngxDirectiveThirdParty set_quote_sql_str -syn keyword ngxDirectiveThirdParty set_quote_pgsql_str -syn keyword ngxDirectiveThirdParty set_quote_json_str -syn keyword ngxDirectiveThirdParty set_unescape_uri -syn keyword ngxDirectiveThirdParty set_escape_uri -syn keyword ngxDirectiveThirdParty set_hashed_upstream -syn keyword ngxDirectiveThirdParty set_encode_base32 -syn keyword ngxDirectiveThirdParty set_base32_padding -syn keyword ngxDirectiveThirdParty set_misc_base32_padding -syn keyword ngxDirectiveThirdParty set_base32_alphabet -syn keyword ngxDirectiveThirdParty set_decode_base32 -syn keyword ngxDirectiveThirdParty set_encode_base64 -syn keyword ngxDirectiveThirdParty set_decode_base64 -syn keyword ngxDirectiveThirdParty set_encode_hex -syn keyword ngxDirectiveThirdParty set_decode_hex -syn keyword ngxDirectiveThirdParty set_sha1 -syn keyword ngxDirectiveThirdParty set_md5 -syn keyword ngxDirectiveThirdParty set_hmac_sha1 -syn keyword ngxDirectiveThirdParty set_random -syn keyword ngxDirectiveThirdParty set_secure_random_alphanum -syn keyword ngxDirectiveThirdParty set_secure_random_lcalpha -syn keyword ngxDirectiveThirdParty set_rotate -syn keyword ngxDirectiveThirdParty set_local_today -syn keyword ngxDirectiveThirdParty set_formatted_gmt_time -syn keyword ngxDirectiveThirdParty set_formatted_local_time +syn keyword ngxDirectiveThirdParty contained set_if_empty +syn keyword ngxDirectiveThirdParty contained set_quote_sql_str +syn keyword ngxDirectiveThirdParty contained set_quote_pgsql_str +syn keyword ngxDirectiveThirdParty contained set_quote_json_str +syn keyword ngxDirectiveThirdParty contained set_unescape_uri +syn keyword ngxDirectiveThirdParty contained set_escape_uri +syn keyword ngxDirectiveThirdParty contained set_hashed_upstream +syn keyword ngxDirectiveThirdParty contained set_encode_base32 +syn keyword ngxDirectiveThirdParty contained set_base32_padding +syn keyword ngxDirectiveThirdParty contained set_misc_base32_padding +syn keyword ngxDirectiveThirdParty contained set_base32_alphabet +syn keyword ngxDirectiveThirdParty contained set_decode_base32 +syn keyword ngxDirectiveThirdParty contained set_encode_base64 +syn keyword ngxDirectiveThirdParty contained set_decode_base64 +syn keyword ngxDirectiveThirdParty contained set_encode_hex +syn keyword ngxDirectiveThirdParty contained set_decode_hex +syn keyword ngxDirectiveThirdParty contained set_sha1 +syn keyword ngxDirectiveThirdParty contained set_md5 +syn keyword ngxDirectiveThirdParty contained set_hmac_sha1 +syn keyword ngxDirectiveThirdParty contained set_random +syn keyword ngxDirectiveThirdParty contained set_secure_random_alphanum +syn keyword ngxDirectiveThirdParty contained set_secure_random_lcalpha +syn keyword ngxDirectiveThirdParty contained set_rotate +syn keyword ngxDirectiveThirdParty contained set_local_today +syn keyword ngxDirectiveThirdParty contained set_formatted_gmt_time +syn keyword ngxDirectiveThirdParty contained set_formatted_local_time " SFlow Module " A binary, random-sampling nginx module designed for: lightweight, centralized, continuous, real-time monitoring of very large and very busy web farms. -syn keyword ngxDirectiveThirdParty sflow +syn keyword ngxDirectiveThirdParty contained sflow " Shibboleth Module " Shibboleth auth request module for nginx -syn keyword ngxDirectiveThirdParty shib_request -syn keyword ngxDirectiveThirdParty shib_request_set -syn keyword ngxDirectiveThirdParty shib_request_use_headers +syn keyword ngxDirectiveThirdParty contained shib_request +syn keyword ngxDirectiveThirdParty contained shib_request_set +syn keyword ngxDirectiveThirdParty contained shib_request_use_headers " Slice Module " Nginx module for serving a file in slices (reverse byte-range) -" syn keyword ngxDirectiveThirdParty slice -syn keyword ngxDirectiveThirdParty slice_arg_begin -syn keyword ngxDirectiveThirdParty slice_arg_end -syn keyword ngxDirectiveThirdParty slice_header -syn keyword ngxDirectiveThirdParty slice_footer -syn keyword ngxDirectiveThirdParty slice_header_first -syn keyword ngxDirectiveThirdParty slice_footer_last +" syn keyword ngxDirectiveThirdParty contained slice +syn keyword ngxDirectiveThirdParty contained slice_arg_begin +syn keyword ngxDirectiveThirdParty contained slice_arg_end +syn keyword ngxDirectiveThirdParty contained slice_header +syn keyword ngxDirectiveThirdParty contained slice_footer +syn keyword ngxDirectiveThirdParty contained slice_header_first +syn keyword ngxDirectiveThirdParty contained slice_footer_last " SlowFS Cache Module " Module adding ability to cache static files. -syn keyword ngxDirectiveThirdParty slowfs_big_file_size -syn keyword ngxDirectiveThirdParty slowfs_cache -syn keyword ngxDirectiveThirdParty slowfs_cache_key -syn keyword ngxDirectiveThirdParty slowfs_cache_min_uses -syn keyword ngxDirectiveThirdParty slowfs_cache_path -syn keyword ngxDirectiveThirdParty slowfs_cache_purge -syn keyword ngxDirectiveThirdParty slowfs_cache_valid -syn keyword ngxDirectiveThirdParty slowfs_temp_path +syn keyword ngxDirectiveThirdParty contained slowfs_big_file_size +syn keyword ngxDirectiveThirdParty contained slowfs_cache +syn keyword ngxDirectiveThirdParty contained slowfs_cache_key +syn keyword ngxDirectiveThirdParty contained slowfs_cache_min_uses +syn keyword ngxDirectiveThirdParty contained slowfs_cache_path +syn keyword ngxDirectiveThirdParty contained slowfs_cache_purge +syn keyword ngxDirectiveThirdParty contained slowfs_cache_valid +syn keyword ngxDirectiveThirdParty contained slowfs_temp_path " Small Light Module " Dynamic Image Transformation Module For nginx. -syn keyword ngxDirectiveThirdParty small_light -syn keyword ngxDirectiveThirdParty small_light_getparam_mode -syn keyword ngxDirectiveThirdParty small_light_material_dir -syn keyword ngxDirectiveThirdParty small_light_pattern_define -syn keyword ngxDirectiveThirdParty small_light_radius_max -syn keyword ngxDirectiveThirdParty small_light_sigma_max -syn keyword ngxDirectiveThirdParty small_light_imlib2_temp_dir -syn keyword ngxDirectiveThirdParty small_light_buffer +syn keyword ngxDirectiveThirdParty contained small_light +syn keyword ngxDirectiveThirdParty contained small_light_getparam_mode +syn keyword ngxDirectiveThirdParty contained small_light_material_dir +syn keyword ngxDirectiveThirdParty contained small_light_pattern_define +syn keyword ngxDirectiveThirdParty contained small_light_radius_max +syn keyword ngxDirectiveThirdParty contained small_light_sigma_max +syn keyword ngxDirectiveThirdParty contained small_light_imlib2_temp_dir +syn keyword ngxDirectiveThirdParty contained small_light_buffer " Sorted Querystring Filter Module " Nginx module to expose querystring parameters sorted in a variable to be used on cache_key as example -syn keyword ngxDirectiveThirdParty sorted_querystring_filter_parameter +syn keyword ngxDirectiveThirdParty contained sorted_querystring_filter_parameter " Sphinx2 Module " Nginx upstream module for Sphinx 2.x -syn keyword ngxDirectiveThirdParty sphinx2_pass -syn keyword ngxDirectiveThirdParty sphinx2_bind -syn keyword ngxDirectiveThirdParty sphinx2_connect_timeout -syn keyword ngxDirectiveThirdParty sphinx2_send_timeout -syn keyword ngxDirectiveThirdParty sphinx2_buffer_size -syn keyword ngxDirectiveThirdParty sphinx2_read_timeout -syn keyword ngxDirectiveThirdParty sphinx2_next_upstream +syn keyword ngxDirectiveThirdParty contained sphinx2_pass +syn keyword ngxDirectiveThirdParty contained sphinx2_bind +syn keyword ngxDirectiveThirdParty contained sphinx2_connect_timeout +syn keyword ngxDirectiveThirdParty contained sphinx2_send_timeout +syn keyword ngxDirectiveThirdParty contained sphinx2_buffer_size +syn keyword ngxDirectiveThirdParty contained sphinx2_read_timeout +syn keyword ngxDirectiveThirdParty contained sphinx2_next_upstream " HTTP SPNEGO auth Module " This module implements adds SPNEGO support to nginx(http://nginx.org). It currently supports only Kerberos authentication via GSSAPI -syn keyword ngxDirectiveThirdParty auth_gss -syn keyword ngxDirectiveThirdParty auth_gss_keytab -syn keyword ngxDirectiveThirdParty auth_gss_realm -syn keyword ngxDirectiveThirdParty auth_gss_service_name -syn keyword ngxDirectiveThirdParty auth_gss_authorized_principal -syn keyword ngxDirectiveThirdParty auth_gss_allow_basic_fallback +syn keyword ngxDirectiveThirdParty contained auth_gss +syn keyword ngxDirectiveThirdParty contained auth_gss_keytab +syn keyword ngxDirectiveThirdParty contained auth_gss_realm +syn keyword ngxDirectiveThirdParty contained auth_gss_service_name +syn keyword ngxDirectiveThirdParty contained auth_gss_authorized_principal +syn keyword ngxDirectiveThirdParty contained auth_gss_allow_basic_fallback " SR Cache Module " Transparent subrequest-based caching layout for arbitrary nginx locations -syn keyword ngxDirectiveThirdParty srcache_fetch -syn keyword ngxDirectiveThirdParty srcache_fetch_skip -syn keyword ngxDirectiveThirdParty srcache_store -syn keyword ngxDirectiveThirdParty srcache_store_max_size -syn keyword ngxDirectiveThirdParty srcache_store_skip -syn keyword ngxDirectiveThirdParty srcache_store_statuses -syn keyword ngxDirectiveThirdParty srcache_store_ranges -syn keyword ngxDirectiveThirdParty srcache_header_buffer_size -syn keyword ngxDirectiveThirdParty srcache_store_hide_header -syn keyword ngxDirectiveThirdParty srcache_store_pass_header -syn keyword ngxDirectiveThirdParty srcache_methods -syn keyword ngxDirectiveThirdParty srcache_ignore_content_encoding -syn keyword ngxDirectiveThirdParty srcache_request_cache_control -syn keyword ngxDirectiveThirdParty srcache_response_cache_control -syn keyword ngxDirectiveThirdParty srcache_store_no_store -syn keyword ngxDirectiveThirdParty srcache_store_no_cache -syn keyword ngxDirectiveThirdParty srcache_store_private -syn keyword ngxDirectiveThirdParty srcache_default_expire -syn keyword ngxDirectiveThirdParty srcache_max_expire +syn keyword ngxDirectiveThirdParty contained srcache_fetch +syn keyword ngxDirectiveThirdParty contained srcache_fetch_skip +syn keyword ngxDirectiveThirdParty contained srcache_store +syn keyword ngxDirectiveThirdParty contained srcache_store_max_size +syn keyword ngxDirectiveThirdParty contained srcache_store_skip +syn keyword ngxDirectiveThirdParty contained srcache_store_statuses +syn keyword ngxDirectiveThirdParty contained srcache_store_ranges +syn keyword ngxDirectiveThirdParty contained srcache_header_buffer_size +syn keyword ngxDirectiveThirdParty contained srcache_store_hide_header +syn keyword ngxDirectiveThirdParty contained srcache_store_pass_header +syn keyword ngxDirectiveThirdParty contained srcache_methods +syn keyword ngxDirectiveThirdParty contained srcache_ignore_content_encoding +syn keyword ngxDirectiveThirdParty contained srcache_request_cache_control +syn keyword ngxDirectiveThirdParty contained srcache_response_cache_control +syn keyword ngxDirectiveThirdParty contained srcache_store_no_store +syn keyword ngxDirectiveThirdParty contained srcache_store_no_cache +syn keyword ngxDirectiveThirdParty contained srcache_store_private +syn keyword ngxDirectiveThirdParty contained srcache_default_expire +syn keyword ngxDirectiveThirdParty contained srcache_max_expire " SSSD Info Module " Retrives additional attributes from SSSD for current authentizated user -syn keyword ngxDirectiveThirdParty sssd_info -syn keyword ngxDirectiveThirdParty sssd_info_output_to -syn keyword ngxDirectiveThirdParty sssd_info_groups -syn keyword ngxDirectiveThirdParty sssd_info_group -syn keyword ngxDirectiveThirdParty sssd_info_group_separator -syn keyword ngxDirectiveThirdParty sssd_info_attributes -syn keyword ngxDirectiveThirdParty sssd_info_attribute -syn keyword ngxDirectiveThirdParty sssd_info_attribute_separator +syn keyword ngxDirectiveThirdParty contained sssd_info +syn keyword ngxDirectiveThirdParty contained sssd_info_output_to +syn keyword ngxDirectiveThirdParty contained sssd_info_groups +syn keyword ngxDirectiveThirdParty contained sssd_info_group +syn keyword ngxDirectiveThirdParty contained sssd_info_group_separator +syn keyword ngxDirectiveThirdParty contained sssd_info_attributes +syn keyword ngxDirectiveThirdParty contained sssd_info_attribute +syn keyword ngxDirectiveThirdParty contained sssd_info_attribute_separator " Static Etags Module " Generate etags for static content -syn keyword ngxDirectiveThirdParty FileETag +syn keyword ngxDirectiveThirdParty contained FileETag " Statsd Module " An nginx module for sending statistics to statsd -syn keyword ngxDirectiveThirdParty statsd_server -syn keyword ngxDirectiveThirdParty statsd_sample_rate -syn keyword ngxDirectiveThirdParty statsd_count -syn keyword ngxDirectiveThirdParty statsd_timing +syn keyword ngxDirectiveThirdParty contained statsd_server +syn keyword ngxDirectiveThirdParty contained statsd_sample_rate +syn keyword ngxDirectiveThirdParty contained statsd_count +syn keyword ngxDirectiveThirdParty contained statsd_timing " Sticky Module " Add a sticky cookie to be always forwarded to the same upstream server -" syn keyword ngxDirectiveThirdParty sticky +" syn keyword ngxDirectiveThirdParty contained sticky " Stream Echo Module " TCP/stream echo module for NGINX (a port of ngx_http_echo_module) -syn keyword ngxDirectiveThirdParty echo -syn keyword ngxDirectiveThirdParty echo_duplicate -syn keyword ngxDirectiveThirdParty echo_flush_wait -syn keyword ngxDirectiveThirdParty echo_sleep -syn keyword ngxDirectiveThirdParty echo_send_timeout -syn keyword ngxDirectiveThirdParty echo_read_bytes -syn keyword ngxDirectiveThirdParty echo_read_line -syn keyword ngxDirectiveThirdParty echo_request_data -syn keyword ngxDirectiveThirdParty echo_discard_request -syn keyword ngxDirectiveThirdParty echo_read_buffer_size -syn keyword ngxDirectiveThirdParty echo_read_timeout -syn keyword ngxDirectiveThirdParty echo_client_error_log_level -syn keyword ngxDirectiveThirdParty echo_lingering_close -syn keyword ngxDirectiveThirdParty echo_lingering_time -syn keyword ngxDirectiveThirdParty echo_lingering_timeout +syn keyword ngxDirectiveThirdParty contained echo +syn keyword ngxDirectiveThirdParty contained echo_duplicate +syn keyword ngxDirectiveThirdParty contained echo_flush_wait +syn keyword ngxDirectiveThirdParty contained echo_sleep +syn keyword ngxDirectiveThirdParty contained echo_send_timeout +syn keyword ngxDirectiveThirdParty contained echo_read_bytes +syn keyword ngxDirectiveThirdParty contained echo_read_line +syn keyword ngxDirectiveThirdParty contained echo_request_data +syn keyword ngxDirectiveThirdParty contained echo_discard_request +syn keyword ngxDirectiveThirdParty contained echo_read_buffer_size +syn keyword ngxDirectiveThirdParty contained echo_read_timeout +syn keyword ngxDirectiveThirdParty contained echo_client_error_log_level +syn keyword ngxDirectiveThirdParty contained echo_lingering_close +syn keyword ngxDirectiveThirdParty contained echo_lingering_time +syn keyword ngxDirectiveThirdParty contained echo_lingering_timeout " Stream Lua Module " Embed the power of Lua into Nginx stream/TCP Servers. -syn keyword ngxDirectiveThirdParty lua_resolver -syn keyword ngxDirectiveThirdParty lua_resolver_timeout -syn keyword ngxDirectiveThirdParty lua_lingering_close -syn keyword ngxDirectiveThirdParty lua_lingering_time -syn keyword ngxDirectiveThirdParty lua_lingering_timeout +syn keyword ngxDirectiveThirdParty contained lua_resolver +syn keyword ngxDirectiveThirdParty contained lua_resolver_timeout +syn keyword ngxDirectiveThirdParty contained lua_lingering_close +syn keyword ngxDirectiveThirdParty contained lua_lingering_time +syn keyword ngxDirectiveThirdParty contained lua_lingering_timeout " Stream Upsync Module " Sync upstreams from consul or others, dynamiclly modify backend-servers attribute(weight, max_fails,...), needn't reload nginx. -syn keyword ngxDirectiveThirdParty upsync -syn keyword ngxDirectiveThirdParty upsync_dump_path -syn keyword ngxDirectiveThirdParty upsync_lb -syn keyword ngxDirectiveThirdParty upsync_show +syn keyword ngxDirectiveThirdParty contained upsync +syn keyword ngxDirectiveThirdParty contained upsync_dump_path +syn keyword ngxDirectiveThirdParty contained upsync_lb +syn keyword ngxDirectiveThirdParty contained upsync_show " Strip Module " Whitespace remover. -syn keyword ngxDirectiveThirdParty strip +syn keyword ngxDirectiveThirdParty contained strip " Subrange Module " Split one big HTTP/Range request to multiple subrange requesets -syn keyword ngxDirectiveThirdParty subrange +syn keyword ngxDirectiveThirdParty contained subrange " Substitutions Module " A filter module which can do both regular expression and fixed string substitutions on response bodies. -syn keyword ngxDirectiveThirdParty subs_filter -syn keyword ngxDirectiveThirdParty subs_filter_types +syn keyword ngxDirectiveThirdParty contained subs_filter +syn keyword ngxDirectiveThirdParty contained subs_filter_types " Summarizer Module " Upstream nginx module to get summaries of documents using the summarizer daemon service -syn keyword ngxDirectiveThirdParty smrzr_filename -syn keyword ngxDirectiveThirdParty smrzr_ratio +syn keyword ngxDirectiveThirdParty contained smrzr_filename +syn keyword ngxDirectiveThirdParty contained smrzr_ratio " Supervisord Module " Module providing nginx with API to communicate with supervisord and manage (start/stop) backends on-demand. -syn keyword ngxDirectiveThirdParty supervisord -syn keyword ngxDirectiveThirdParty supervisord_inherit_backend_status -syn keyword ngxDirectiveThirdParty supervisord_name -syn keyword ngxDirectiveThirdParty supervisord_start -syn keyword ngxDirectiveThirdParty supervisord_stop +syn keyword ngxDirectiveThirdParty contained supervisord +syn keyword ngxDirectiveThirdParty contained supervisord_inherit_backend_status +syn keyword ngxDirectiveThirdParty contained supervisord_name +syn keyword ngxDirectiveThirdParty contained supervisord_start +syn keyword ngxDirectiveThirdParty contained supervisord_stop " Tarantool Upstream Module " Tarantool NginX upstream module (REST, JSON API, websockets, load balancing) -syn keyword ngxDirectiveThirdParty tnt_pass -syn keyword ngxDirectiveThirdParty tnt_http_methods -syn keyword ngxDirectiveThirdParty tnt_http_rest_methods -syn keyword ngxDirectiveThirdParty tnt_pass_http_request -syn keyword ngxDirectiveThirdParty tnt_pass_http_request_buffer_size -syn keyword ngxDirectiveThirdParty tnt_method -syn keyword ngxDirectiveThirdParty tnt_http_allowed_methods - experemental -syn keyword ngxDirectiveThirdParty tnt_send_timeout -syn keyword ngxDirectiveThirdParty tnt_read_timeout -syn keyword ngxDirectiveThirdParty tnt_buffer_size -syn keyword ngxDirectiveThirdParty tnt_next_upstream -syn keyword ngxDirectiveThirdParty tnt_connect_timeout -syn keyword ngxDirectiveThirdParty tnt_next_upstream -syn keyword ngxDirectiveThirdParty tnt_next_upstream_tries -syn keyword ngxDirectiveThirdParty tnt_next_upstream_timeout +syn keyword ngxDirectiveThirdParty contained tnt_pass +syn keyword ngxDirectiveThirdParty contained tnt_http_methods +syn keyword ngxDirectiveThirdParty contained tnt_http_rest_methods +syn keyword ngxDirectiveThirdParty contained tnt_pass_http_request +syn keyword ngxDirectiveThirdParty contained tnt_pass_http_request_buffer_size +syn keyword ngxDirectiveThirdParty contained tnt_method +syn keyword ngxDirectiveThirdParty contained tnt_http_allowed_methods - experemental +syn keyword ngxDirectiveThirdParty contained tnt_send_timeout +syn keyword ngxDirectiveThirdParty contained tnt_read_timeout +syn keyword ngxDirectiveThirdParty contained tnt_buffer_size +syn keyword ngxDirectiveThirdParty contained tnt_next_upstream +syn keyword ngxDirectiveThirdParty contained tnt_connect_timeout +syn keyword ngxDirectiveThirdParty contained tnt_next_upstream +syn keyword ngxDirectiveThirdParty contained tnt_next_upstream_tries +syn keyword ngxDirectiveThirdParty contained tnt_next_upstream_timeout " TCP Proxy Module " Add the feature of tcp proxy with nginx, with health check and status monitor -syn keyword ngxDirectiveBlock tcp -" syn keyword ngxDirectiveThirdParty server -" syn keyword ngxDirectiveThirdParty listen -" syn keyword ngxDirectiveThirdParty allow -" syn keyword ngxDirectiveThirdParty deny -" syn keyword ngxDirectiveThirdParty so_keepalive -" syn keyword ngxDirectiveThirdParty tcp_nodelay -" syn keyword ngxDirectiveThirdParty timeout -" syn keyword ngxDirectiveThirdParty server_name -" syn keyword ngxDirectiveThirdParty resolver -" syn keyword ngxDirectiveThirdParty resolver_timeout -" syn keyword ngxDirectiveThirdParty upstream -syn keyword ngxDirectiveThirdParty check -syn keyword ngxDirectiveThirdParty check_http_send -syn keyword ngxDirectiveThirdParty check_http_expect_alive -syn keyword ngxDirectiveThirdParty check_smtp_send -syn keyword ngxDirectiveThirdParty check_smtp_expect_alive -syn keyword ngxDirectiveThirdParty check_shm_size -syn keyword ngxDirectiveThirdParty check_status -" syn keyword ngxDirectiveThirdParty ip_hash -" syn keyword ngxDirectiveThirdParty proxy_pass -" syn keyword ngxDirectiveThirdParty proxy_buffer -" syn keyword ngxDirectiveThirdParty proxy_connect_timeout -" syn keyword ngxDirectiveThirdParty proxy_read_timeout -syn keyword ngxDirectiveThirdParty proxy_write_timeout +syn keyword ngxDirectiveBlock contained tcp +" syn keyword ngxDirectiveThirdParty contained server +" syn keyword ngxDirectiveThirdParty contained listen +" syn keyword ngxDirectiveThirdParty contained allow +" syn keyword ngxDirectiveThirdParty contained deny +" syn keyword ngxDirectiveThirdParty contained so_keepalive +" syn keyword ngxDirectiveThirdParty contained tcp_nodelay +" syn keyword ngxDirectiveThirdParty contained timeout +" syn keyword ngxDirectiveThirdParty contained server_name +" syn keyword ngxDirectiveThirdParty contained resolver +" syn keyword ngxDirectiveThirdParty contained resolver_timeout +" syn keyword ngxDirectiveThirdParty contained upstream +syn keyword ngxDirectiveThirdParty contained check +syn keyword ngxDirectiveThirdParty contained check_http_send +syn keyword ngxDirectiveThirdParty contained check_http_expect_alive +syn keyword ngxDirectiveThirdParty contained check_smtp_send +syn keyword ngxDirectiveThirdParty contained check_smtp_expect_alive +syn keyword ngxDirectiveThirdParty contained check_shm_size +syn keyword ngxDirectiveThirdParty contained check_status +" syn keyword ngxDirectiveThirdParty contained ip_hash +" syn keyword ngxDirectiveThirdParty contained proxy_pass +" syn keyword ngxDirectiveThirdParty contained proxy_buffer +" syn keyword ngxDirectiveThirdParty contained proxy_connect_timeout +" syn keyword ngxDirectiveThirdParty contained proxy_read_timeout +syn keyword ngxDirectiveThirdParty contained proxy_write_timeout " Testcookie Module " NGINX module for L7 DDoS attack mitigation -syn keyword ngxDirectiveThirdParty testcookie -syn keyword ngxDirectiveThirdParty testcookie_name -syn keyword ngxDirectiveThirdParty testcookie_domain -syn keyword ngxDirectiveThirdParty testcookie_expires -syn keyword ngxDirectiveThirdParty testcookie_path -syn keyword ngxDirectiveThirdParty testcookie_secret -syn keyword ngxDirectiveThirdParty testcookie_session -syn keyword ngxDirectiveThirdParty testcookie_arg -syn keyword ngxDirectiveThirdParty testcookie_max_attempts -syn keyword ngxDirectiveThirdParty testcookie_p3p -syn keyword ngxDirectiveThirdParty testcookie_fallback -syn keyword ngxDirectiveThirdParty testcookie_whitelist -syn keyword ngxDirectiveThirdParty testcookie_pass -syn keyword ngxDirectiveThirdParty testcookie_redirect_via_refresh -syn keyword ngxDirectiveThirdParty testcookie_refresh_template -syn keyword ngxDirectiveThirdParty testcookie_refresh_status -syn keyword ngxDirectiveThirdParty testcookie_deny_keepalive -syn keyword ngxDirectiveThirdParty testcookie_get_only -syn keyword ngxDirectiveThirdParty testcookie_https_location -syn keyword ngxDirectiveThirdParty testcookie_refresh_encrypt_cookie -syn keyword ngxDirectiveThirdParty testcookie_refresh_encrypt_cookie_key -syn keyword ngxDirectiveThirdParty testcookie_refresh_encrypt_iv -syn keyword ngxDirectiveThirdParty testcookie_internal -syn keyword ngxDirectiveThirdParty testcookie_httponly_flag -syn keyword ngxDirectiveThirdParty testcookie_secure_flag +syn keyword ngxDirectiveThirdParty contained testcookie +syn keyword ngxDirectiveThirdParty contained testcookie_name +syn keyword ngxDirectiveThirdParty contained testcookie_domain +syn keyword ngxDirectiveThirdParty contained testcookie_expires +syn keyword ngxDirectiveThirdParty contained testcookie_path +syn keyword ngxDirectiveThirdParty contained testcookie_secret +syn keyword ngxDirectiveThirdParty contained testcookie_session +syn keyword ngxDirectiveThirdParty contained testcookie_arg +syn keyword ngxDirectiveThirdParty contained testcookie_max_attempts +syn keyword ngxDirectiveThirdParty contained testcookie_p3p +syn keyword ngxDirectiveThirdParty contained testcookie_fallback +syn keyword ngxDirectiveThirdParty contained testcookie_whitelist +syn keyword ngxDirectiveThirdParty contained testcookie_pass +syn keyword ngxDirectiveThirdParty contained testcookie_redirect_via_refresh +syn keyword ngxDirectiveThirdParty contained testcookie_refresh_template +syn keyword ngxDirectiveThirdParty contained testcookie_refresh_status +syn keyword ngxDirectiveThirdParty contained testcookie_deny_keepalive +syn keyword ngxDirectiveThirdParty contained testcookie_get_only +syn keyword ngxDirectiveThirdParty contained testcookie_https_location +syn keyword ngxDirectiveThirdParty contained testcookie_refresh_encrypt_cookie +syn keyword ngxDirectiveThirdParty contained testcookie_refresh_encrypt_cookie_key +syn keyword ngxDirectiveThirdParty contained testcookie_refresh_encrypt_iv +syn keyword ngxDirectiveThirdParty contained testcookie_internal +syn keyword ngxDirectiveThirdParty contained testcookie_httponly_flag +syn keyword ngxDirectiveThirdParty contained testcookie_secure_flag " Types Filter Module " Change the `Content-Type` output header depending on an extension variable according to a condition specified in the 'if' clause. -syn keyword ngxDirectiveThirdParty types_filter -syn keyword ngxDirectiveThirdParty types_filter_use_default +syn keyword ngxDirectiveThirdParty contained types_filter +syn keyword ngxDirectiveThirdParty contained types_filter_use_default " Unzip Module " Enabling fetching of files that are stored in zipped archives. -syn keyword ngxDirectiveThirdParty file_in_unzip_archivefile -syn keyword ngxDirectiveThirdParty file_in_unzip_extract -syn keyword ngxDirectiveThirdParty file_in_unzip +syn keyword ngxDirectiveThirdParty contained file_in_unzip_archivefile +syn keyword ngxDirectiveThirdParty contained file_in_unzip_extract +syn keyword ngxDirectiveThirdParty contained file_in_unzip " Upload Progress Module " An upload progress system, that monitors RFC1867 POST upload as they are transmitted to upstream servers -syn keyword ngxDirectiveThirdParty upload_progress -syn keyword ngxDirectiveThirdParty track_uploads -syn keyword ngxDirectiveThirdParty report_uploads -syn keyword ngxDirectiveThirdParty upload_progress_content_type -syn keyword ngxDirectiveThirdParty upload_progress_header -syn keyword ngxDirectiveThirdParty upload_progress_jsonp_parameter -syn keyword ngxDirectiveThirdParty upload_progress_json_output -syn keyword ngxDirectiveThirdParty upload_progress_jsonp_output -syn keyword ngxDirectiveThirdParty upload_progress_template +syn keyword ngxDirectiveThirdParty contained upload_progress +syn keyword ngxDirectiveThirdParty contained track_uploads +syn keyword ngxDirectiveThirdParty contained report_uploads +syn keyword ngxDirectiveThirdParty contained upload_progress_content_type +syn keyword ngxDirectiveThirdParty contained upload_progress_header +syn keyword ngxDirectiveThirdParty contained upload_progress_jsonp_parameter +syn keyword ngxDirectiveThirdParty contained upload_progress_json_output +syn keyword ngxDirectiveThirdParty contained upload_progress_jsonp_output +syn keyword ngxDirectiveThirdParty contained upload_progress_template " Upload Module " Parses request body storing all files being uploaded to a directory specified by upload_store directive -syn keyword ngxDirectiveThirdParty upload_pass -syn keyword ngxDirectiveThirdParty upload_resumable -syn keyword ngxDirectiveThirdParty upload_store -syn keyword ngxDirectiveThirdParty upload_state_store -syn keyword ngxDirectiveThirdParty upload_store_access -syn keyword ngxDirectiveThirdParty upload_set_form_field -syn keyword ngxDirectiveThirdParty upload_aggregate_form_field -syn keyword ngxDirectiveThirdParty upload_pass_form_field -syn keyword ngxDirectiveThirdParty upload_cleanup -syn keyword ngxDirectiveThirdParty upload_buffer_size -syn keyword ngxDirectiveThirdParty upload_max_part_header_len -syn keyword ngxDirectiveThirdParty upload_max_file_size -syn keyword ngxDirectiveThirdParty upload_limit_rate -syn keyword ngxDirectiveThirdParty upload_max_output_body_len -syn keyword ngxDirectiveThirdParty upload_tame_arrays -syn keyword ngxDirectiveThirdParty upload_pass_args +syn keyword ngxDirectiveThirdParty contained upload_pass +syn keyword ngxDirectiveThirdParty contained upload_resumable +syn keyword ngxDirectiveThirdParty contained upload_store +syn keyword ngxDirectiveThirdParty contained upload_state_store +syn keyword ngxDirectiveThirdParty contained upload_store_access +syn keyword ngxDirectiveThirdParty contained upload_set_form_field +syn keyword ngxDirectiveThirdParty contained upload_aggregate_form_field +syn keyword ngxDirectiveThirdParty contained upload_pass_form_field +syn keyword ngxDirectiveThirdParty contained upload_cleanup +syn keyword ngxDirectiveThirdParty contained upload_buffer_size +syn keyword ngxDirectiveThirdParty contained upload_max_part_header_len +syn keyword ngxDirectiveThirdParty contained upload_max_file_size +syn keyword ngxDirectiveThirdParty contained upload_limit_rate +syn keyword ngxDirectiveThirdParty contained upload_max_output_body_len +syn keyword ngxDirectiveThirdParty contained upload_tame_arrays +syn keyword ngxDirectiveThirdParty contained upload_pass_args " Upstream Fair Module " The fair load balancer module for nginx http://nginx.localdomain.pl -syn keyword ngxDirectiveThirdParty fair -syn keyword ngxDirectiveThirdParty upstream_fair_shm_size +syn keyword ngxDirectiveThirdParty contained fair +syn keyword ngxDirectiveThirdParty contained upstream_fair_shm_size " Upstream Hash Module (DEPRECATED) " Provides simple upstream load distribution by hashing a configurable variable. -" syn keyword ngxDirectiveDeprecated hash -syn keyword ngxDirectiveDeprecated hash_again +" syn keyword ngxDirectiveDeprecated contained hash +syn keyword ngxDirectiveDeprecated contained hash_again " Upstream Domain Resolve Module " A load-balancer that resolves an upstream domain name asynchronously. -syn keyword ngxDirectiveThirdParty jdomain +syn keyword ngxDirectiveThirdParty contained jdomain " Upsync Module " Sync upstreams from consul or others, dynamiclly modify backend-servers attribute(weight, max_fails,...), needn't reload nginx -syn keyword ngxDirectiveThirdParty upsync -syn keyword ngxDirectiveThirdParty upsync_dump_path -syn keyword ngxDirectiveThirdParty upsync_lb -syn keyword ngxDirectiveThirdParty upstream_show +syn keyword ngxDirectiveThirdParty contained upsync +syn keyword ngxDirectiveThirdParty contained upsync_dump_path +syn keyword ngxDirectiveThirdParty contained upsync_lb +syn keyword ngxDirectiveThirdParty contained upstream_show " URL Module " Nginx url encoding converting module -syn keyword ngxDirectiveThirdParty url_encoding_convert -syn keyword ngxDirectiveThirdParty url_encoding_convert_from -syn keyword ngxDirectiveThirdParty url_encoding_convert_to +syn keyword ngxDirectiveThirdParty contained url_encoding_convert +syn keyword ngxDirectiveThirdParty contained url_encoding_convert_from +syn keyword ngxDirectiveThirdParty contained url_encoding_convert_to " User Agent Module " Match browsers and crawlers -syn keyword ngxDirectiveThirdParty user_agent +syn keyword ngxDirectiveThirdParty contained user_agent " Upstrema Ketama Chash Module " Nginx load-balancer module implementing ketama consistent hashing. -syn keyword ngxDirectiveThirdParty ketama_chash +syn keyword ngxDirectiveThirdParty contained ketama_chash " Video Thumbextractor Module " Extract thumbs from a video file -syn keyword ngxDirectiveThirdParty video_thumbextractor -syn keyword ngxDirectiveThirdParty video_thumbextractor_video_filename -syn keyword ngxDirectiveThirdParty video_thumbextractor_video_second -syn keyword ngxDirectiveThirdParty video_thumbextractor_image_width -syn keyword ngxDirectiveThirdParty video_thumbextractor_image_height -syn keyword ngxDirectiveThirdParty video_thumbextractor_only_keyframe -syn keyword ngxDirectiveThirdParty video_thumbextractor_next_time -syn keyword ngxDirectiveThirdParty video_thumbextractor_tile_rows -syn keyword ngxDirectiveThirdParty video_thumbextractor_tile_cols -syn keyword ngxDirectiveThirdParty video_thumbextractor_tile_max_rows -syn keyword ngxDirectiveThirdParty video_thumbextractor_tile_max_cols -syn keyword ngxDirectiveThirdParty video_thumbextractor_tile_sample_interval -syn keyword ngxDirectiveThirdParty video_thumbextractor_tile_color -syn keyword ngxDirectiveThirdParty video_thumbextractor_tile_margin -syn keyword ngxDirectiveThirdParty video_thumbextractor_tile_padding -syn keyword ngxDirectiveThirdParty video_thumbextractor_threads -syn keyword ngxDirectiveThirdParty video_thumbextractor_processes_per_worker +syn keyword ngxDirectiveThirdParty contained video_thumbextractor +syn keyword ngxDirectiveThirdParty contained video_thumbextractor_video_filename +syn keyword ngxDirectiveThirdParty contained video_thumbextractor_video_second +syn keyword ngxDirectiveThirdParty contained video_thumbextractor_image_width +syn keyword ngxDirectiveThirdParty contained video_thumbextractor_image_height +syn keyword ngxDirectiveThirdParty contained video_thumbextractor_only_keyframe +syn keyword ngxDirectiveThirdParty contained video_thumbextractor_next_time +syn keyword ngxDirectiveThirdParty contained video_thumbextractor_tile_rows +syn keyword ngxDirectiveThirdParty contained video_thumbextractor_tile_cols +syn keyword ngxDirectiveThirdParty contained video_thumbextractor_tile_max_rows +syn keyword ngxDirectiveThirdParty contained video_thumbextractor_tile_max_cols +syn keyword ngxDirectiveThirdParty contained video_thumbextractor_tile_sample_interval +syn keyword ngxDirectiveThirdParty contained video_thumbextractor_tile_color +syn keyword ngxDirectiveThirdParty contained video_thumbextractor_tile_margin +syn keyword ngxDirectiveThirdParty contained video_thumbextractor_tile_padding +syn keyword ngxDirectiveThirdParty contained video_thumbextractor_threads +syn keyword ngxDirectiveThirdParty contained video_thumbextractor_processes_per_worker " Eval Module " Module for nginx web server evaluates response of proxy or memcached module into variables. -syn keyword ngxDirectiveThirdParty eval -syn keyword ngxDirectiveThirdParty eval_escalate -syn keyword ngxDirectiveThirdParty eval_override_content_type +syn keyword ngxDirectiveThirdParty contained eval +syn keyword ngxDirectiveThirdParty contained eval_escalate +syn keyword ngxDirectiveThirdParty contained eval_override_content_type " VTS Module " Nginx virtual host traffic status module -syn keyword ngxDirectiveThirdParty vhost_traffic_status -syn keyword ngxDirectiveThirdParty vhost_traffic_status_zone -syn keyword ngxDirectiveThirdParty vhost_traffic_status_display -syn keyword ngxDirectiveThirdParty vhost_traffic_status_display_format -syn keyword ngxDirectiveThirdParty vhost_traffic_status_display_jsonp -syn keyword ngxDirectiveThirdParty vhost_traffic_status_filter -syn keyword ngxDirectiveThirdParty vhost_traffic_status_filter_by_host -syn keyword ngxDirectiveThirdParty vhost_traffic_status_filter_by_set_key -syn keyword ngxDirectiveThirdParty vhost_traffic_status_filter_check_duplicate -syn keyword ngxDirectiveThirdParty vhost_traffic_status_limit -syn keyword ngxDirectiveThirdParty vhost_traffic_status_limit_traffic -syn keyword ngxDirectiveThirdParty vhost_traffic_status_limit_traffic_by_set_key -syn keyword ngxDirectiveThirdParty vhost_traffic_status_limit_check_duplicate +syn keyword ngxDirectiveThirdParty contained vhost_traffic_status +syn keyword ngxDirectiveThirdParty contained vhost_traffic_status_zone +syn keyword ngxDirectiveThirdParty contained vhost_traffic_status_display +syn keyword ngxDirectiveThirdParty contained vhost_traffic_status_display_format +syn keyword ngxDirectiveThirdParty contained vhost_traffic_status_display_jsonp +syn keyword ngxDirectiveThirdParty contained vhost_traffic_status_filter +syn keyword ngxDirectiveThirdParty contained vhost_traffic_status_filter_by_host +syn keyword ngxDirectiveThirdParty contained vhost_traffic_status_filter_by_set_key +syn keyword ngxDirectiveThirdParty contained vhost_traffic_status_filter_check_duplicate +syn keyword ngxDirectiveThirdParty contained vhost_traffic_status_limit +syn keyword ngxDirectiveThirdParty contained vhost_traffic_status_limit_traffic +syn keyword ngxDirectiveThirdParty contained vhost_traffic_status_limit_traffic_by_set_key +syn keyword ngxDirectiveThirdParty contained vhost_traffic_status_limit_check_duplicate " XSS Module " Native support for cross-site scripting (XSS) in an nginx. -syn keyword ngxDirectiveThirdParty xss_get -syn keyword ngxDirectiveThirdParty xss_callback_arg -syn keyword ngxDirectiveThirdParty xss_override_status -syn keyword ngxDirectiveThirdParty xss_check_status -syn keyword ngxDirectiveThirdParty xss_input_types +syn keyword ngxDirectiveThirdParty contained xss_get +syn keyword ngxDirectiveThirdParty contained xss_callback_arg +syn keyword ngxDirectiveThirdParty contained xss_override_status +syn keyword ngxDirectiveThirdParty contained xss_check_status +syn keyword ngxDirectiveThirdParty contained xss_input_types " ZIP Module " ZIP archiver for nginx @@ -2122,15 +2146,17 @@ syn keyword ngxDirectiveThirdParty xss_i " highlight hi link ngxComment Comment +hi link ngxParamComment Comment +hi link ngxListenComment Comment hi link ngxVariable Identifier -hi link ngxVariableBlock Identifier hi link ngxVariableString PreProc -hi link ngxBlock Normal hi link ngxString String +hi link ngxListenString String hi link ngxBoolean Boolean hi link ngxDirectiveBlock Statement hi link ngxDirectiveImportant Type +hi link ngxDirectiveImportantListen Type hi link ngxDirectiveControl Keyword hi link ngxDirectiveError Constant hi link ngxDirectiveDeprecated Error -- Maxim Dounin http://nginx.org/ From piotrsikora at google.com Fri Apr 7 21:40:18 2017 From: piotrsikora at google.com (Piotr Sikora) Date: Fri, 7 Apr 2017 14:40:18 -0700 Subject: [PATCH] HTTP/2: add debug logging of pseudo-headers In-Reply-To: <6166656.7LtoHmd8e7@vbart-workstation> References: <3d72ae17c41990774721.1491275614@piotrsikora.sfo.corp.google.com> <6166656.7LtoHmd8e7@vbart-workstation> Message-ID: Hey Valentin, > Maybe "http2 pseudo-header: \":%V: %V\""? > Because it doesn't look like a valid "http header". I was going back and forth between different versions, but I ended up using "http header", which matches rest of the headers and has the same alignment, because then pseudo-headers look like part of the same logical block, i.e. [debug] 1#1: *1 http2 http header: ":method: GET" [debug] 1#1: *1 http2 http header: ":path: /h2x" [debug] 1#1: *1 http2 http header: ":scheme: http" [debug] 1#1: *1 http2 http header: ":authority: 127.0.0.1" [debug] 1#1: *1 http2 http header: "accept: */*" [debug] 1#1: *1 http2 http header: "accept-encoding: gzip, deflate" [debug] 1#1: *1 http2 http header: "user-agent: nghttp2/1.21.0-DEV" vs [debug] 1#1: *1 http2 pseudo-header: ":method: GET" [debug] 1#1: *1 http2 pseudo-header: ":path: /h2x" [debug] 1#1: *1 http2 pseudo-header: ":scheme: http" [debug] 1#1: *1 http2 pseudo-header: ":authority: 127.0.0.1" [debug] 1#1: *1 http2 http header: "accept: */*" [debug] 1#1: *1 http2 http header: "accept-encoding: gzip, deflate" [debug] 1#1: *1 http2 http header: "user-agent: nghttp2/1.21.0-DEV" vs [debug] 1#1: *1 http2 http pseudo-header: ":method: GET" [debug] 1#1: *1 http2 http pseudo-header: ":path: /h2x" [debug] 1#1: *1 http2 http pseudo-header: ":scheme: http" [debug] 1#1: *1 http2 http pseudo-header: ":authority: 127.0.0.1" [debug] 1#1: *1 http2 http header: "accept: */*" [debug] 1#1: *1 http2 http header: "accept-encoding: gzip, deflate" [debug] 1#1: *1 http2 http header: "user-agent: nghttp2/1.21.0-DEV" The ":" prefix already indicates those are pseudo-headers, and because of different alignment, all the alternatives make them look like unrelated things. This might be just a matter of taste, though, so if you feel strongly about one of the alternatives, then I can change it, just please be explicit about it. Best regards, Piotr Sikora From piotrsikora at google.com Fri Apr 7 21:42:07 2017 From: piotrsikora at google.com (Piotr Sikora) Date: Fri, 7 Apr 2017 14:42:07 -0700 Subject: [PATCH] HTTP/2: add debug logging of control frames In-Reply-To: <1619400.xHm06BXEHk@vbart-workstation> References: <06d6418afe6e73604aea.1491275620@piotrsikora.sfo.corp.google.com> <1619400.xHm06BXEHk@vbart-workstation> Message-ID: Hey Valentin, > You can always find these values in configuration, and I can't remember a case where > I've ever needed them. On the contrary, there's always a problem with the huge size > of typical http/2 debug log. So it's not a good idea to add something just because > we can. As someone who spent the last few days debugging HTTP/2 interoperability issues, looking at those debug logs, I strongly disagree. Also, NGINX's HTTP/2 debug log is really nice (other than the lack of "recv" prefix [1]) and can be used as a transcript of HTTP/2 exchange, which can be shared with people that don't use NGINX, in which case having SETTINGS values there is critical. Actually, I have local patch that adds even more debugging for SETTINGS frame (I'll squash it into this one and send to the mailing list shortly). [1] btw: Would you accept patch that adds "recv" prefix to all received frames? This would allow for easy "http2 send|http2 recv" grep for HTTP/2 transcript, and would align frame recv/send messages. Best regards, Piotr Sikora From piotrsikora at google.com Fri Apr 7 22:08:48 2017 From: piotrsikora at google.com (Piotr Sikora) Date: Fri, 07 Apr 2017 15:08:48 -0700 Subject: [PATCH] HTTP/2: add debug logging of control frames In-Reply-To: <06d6418afe6e73604aea.1491275620@piotrsikora.sfo.corp.google.com> References: <06d6418afe6e73604aea.1491275620@piotrsikora.sfo.corp.google.com> Message-ID: <7414a1467d0684a73d09.1491602928@piotrsikora.sfo.corp.google.com> # HG changeset patch # User Piotr Sikora # Date 1490516711 25200 # Sun Mar 26 01:25:11 2017 -0700 # Node ID 7414a1467d0684a73d091c508834973b944890cd # Parent 22be63bf21edaa1b8ea916c7d8cd4e5fe4892061 HTTP/2: add debug logging of control frames. Signed-off-by: Piotr Sikora diff -r 22be63bf21ed -r 7414a1467d06 src/http/v2/ngx_http_v2.c --- a/src/http/v2/ngx_http_v2.c +++ b/src/http/v2/ngx_http_v2.c @@ -40,9 +40,11 @@ /* settings fields */ #define NGX_HTTP_V2_HEADER_TABLE_SIZE_SETTING 0x1 +#define NGX_HTTP_V2_ENABLE_PUSH_SETTING 0x2 #define NGX_HTTP_V2_MAX_STREAMS_SETTING 0x3 #define NGX_HTTP_V2_INIT_WINDOW_SIZE_SETTING 0x4 #define NGX_HTTP_V2_MAX_FRAME_SIZE_SETTING 0x5 +#define NGX_HTTP_V2_HEADER_LIST_SIZE_SETTING 0x6 #define NGX_HTTP_V2_FRAME_BUFFER_SIZE 24 @@ -1955,6 +1957,9 @@ ngx_http_v2_state_settings(ngx_http_v2_c return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_SIZE_ERROR); } + ngx_log_debug0(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 SETTINGS frame ack:1"); + h2c->settings_ack = 1; return ngx_http_v2_state_complete(h2c, pos, end); @@ -1968,6 +1973,10 @@ ngx_http_v2_state_settings(ngx_http_v2_c return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_SIZE_ERROR); } + ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 SETTINGS frame params:%uz", + h2c->state.length / NGX_HTTP_V2_SETTINGS_PARAM_SIZE); + ngx_http_v2_send_settings(h2c, 1); return ngx_http_v2_state_settings_params(h2c, pos, end); @@ -1993,6 +2002,27 @@ ngx_http_v2_state_settings_params(ngx_ht switch (id) { + case NGX_HTTP_V2_HEADER_TABLE_SIZE_SETTING: + + ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 SETTINGS frame HEADER_TABLE_SIZE:%ui " + "(ignored)", value); + break; + + case NGX_HTTP_V2_ENABLE_PUSH_SETTING: + + ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 SETTINGS frame ENABLE_PUSH:%ui " + "(ignored)", value); + break; + + case NGX_HTTP_V2_MAX_STREAMS_SETTING: + + ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 SETTINGS frame MAX_CONCURRENT_STREAMS:%ui " + "(ignored)", value); + break; + case NGX_HTTP_V2_INIT_WINDOW_SIZE_SETTING: if (value > NGX_HTTP_V2_MAX_WINDOW) { @@ -2004,6 +2034,10 @@ ngx_http_v2_state_settings_params(ngx_ht NGX_HTTP_V2_FLOW_CTRL_ERROR); } + ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 SETTINGS frame INITIAL_WINDOW_SIZE:%ui", + value); + if (ngx_http_v2_adjust_windows(h2c, value - h2c->init_window) != NGX_OK) { @@ -2026,10 +2060,25 @@ ngx_http_v2_state_settings_params(ngx_ht NGX_HTTP_V2_PROTOCOL_ERROR); } + ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 SETTINGS frame MAX_FRAME_SIZE:%ui", + value); + h2c->frame_size = value; break; + case NGX_HTTP_V2_HEADER_LIST_SIZE_SETTING: + + ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 SETTINGS frame MAX_HEADER_LIST_SIZE:%ui " + "(ignored)", value); + break; + default: + + ngx_log_debug2(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 SETTINGS frame 0x%Xi:%ui " + "(ignored)", id, value); break; } @@ -2070,12 +2119,16 @@ ngx_http_v2_state_ping(ngx_http_v2_conne } ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, - "http2 PING frame, flags: %ud", h2c->state.flags); + "http2 PING frame ack:%ud", + h2c->state.flags & NGX_HTTP_V2_ACK_FLAG ? 1 : 0); if (h2c->state.flags & NGX_HTTP_V2_ACK_FLAG) { return ngx_http_v2_state_skip(h2c, pos, end); } + ngx_log_debug0(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 send PING frame ack:1"); + frame = ngx_http_v2_get_frame(h2c, NGX_HTTP_V2_PING_SIZE, NGX_HTTP_V2_PING_FRAME, NGX_HTTP_V2_ACK_FLAG, 0); @@ -2449,8 +2502,18 @@ ngx_http_v2_send_settings(ngx_http_v2_co ngx_http_v2_srv_conf_t *h2scf; ngx_http_v2_out_frame_t *frame; - ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, - "http2 send SETTINGS frame ack:%ui", ack); + if (ack) { + ngx_log_debug0(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 send SETTINGS frame ack:1"); + + len = 0; + + } else { + ngx_log_debug0(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 send SETTINGS frame params:3"); + + len = NGX_HTTP_V2_SETTINGS_PARAM_SIZE * 3; + } frame = ngx_palloc(h2c->pool, sizeof(ngx_http_v2_out_frame_t)); if (frame == NULL) { @@ -2462,8 +2525,6 @@ ngx_http_v2_send_settings(ngx_http_v2_co return NGX_ERROR; } - len = ack ? 0 : (sizeof(uint16_t) + sizeof(uint32_t)) * 3; - buf = ngx_create_temp_buf(h2c->pool, NGX_HTTP_V2_FRAME_HEADER_SIZE + len); if (buf == NULL) { return NGX_ERROR; @@ -2494,15 +2555,27 @@ ngx_http_v2_send_settings(ngx_http_v2_co h2scf = ngx_http_get_module_srv_conf(h2c->http_connection->conf_ctx, ngx_http_v2_module); + ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 send SETTINGS frame MAX_CONCURRENT_STREAMS:%ui", + h2scf->concurrent_streams); + buf->last = ngx_http_v2_write_uint16(buf->last, NGX_HTTP_V2_MAX_STREAMS_SETTING); buf->last = ngx_http_v2_write_uint32(buf->last, h2scf->concurrent_streams); + ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 send SETTINGS frame INITIAL_WINDOW_SIZE:%uz", + h2scf->preread_size); + buf->last = ngx_http_v2_write_uint16(buf->last, NGX_HTTP_V2_INIT_WINDOW_SIZE_SETTING); buf->last = ngx_http_v2_write_uint32(buf->last, h2scf->preread_size); + ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 send SETTINGS frame MAX_FRAME_SIZE:%ud", + NGX_HTTP_V2_MAX_FRAME_SIZE); + buf->last = ngx_http_v2_write_uint16(buf->last, NGX_HTTP_V2_MAX_FRAME_SIZE_SETTING); buf->last = ngx_http_v2_write_uint32(buf->last, From piotrsikora at google.com Sun Apr 9 04:17:26 2017 From: piotrsikora at google.com (Piotr Sikora) Date: Sat, 8 Apr 2017 21:17:26 -0700 Subject: [PATCH] HTTP/2: add fast-path for HTTP/2 requests without request body In-Reply-To: <3274060.dBGtzE6Y78@vbart-workstation> References: <1959760.0ShWjv0uEp@vbart-workstation> <630a8209defe25add709.1490839177@piotrsikora.sfo.corp.google.com> <3274060.dBGtzE6Y78@vbart-workstation> Message-ID: Hey Valentin, > With your patch the behavior is different in these cases: > > GET / HTTP/1.1 > Host: example.com > Transfer-Encoding: chunked > > 0 > > and > > HEADERS > DATA length:0 END_STREAM That wasn't really the case I was optimizing for, but that's a good point. > Moreover, it depends on the time when DATA frame is processed: > before ngx_http_read_request_body() call or after. Does it? Won't content handlers (and thus ngx_http_v2_read_request_body()) be always called right after HEADERS frame is processed? Anyway, both of your patches work as well, so feel free to commit any of those. Thanks! Best regards, Piotr Sikora From piotrsikora at google.com Sun Apr 9 12:27:22 2017 From: piotrsikora at google.com (Piotr Sikora) Date: Sun, 09 Apr 2017 05:27:22 -0700 Subject: [PATCH] HTTP/2: add debug logging of pseudo-headers and cookies In-Reply-To: <3d72ae17c41990774721.1491275614@piotrsikora.sfo.corp.google.com> References: <3d72ae17c41990774721.1491275614@piotrsikora.sfo.corp.google.com> Message-ID: <7e98d1dbb9ffc83a4ae6.1491740842@piotrsikora.sfo.corp.google.com> # HG changeset patch # User Piotr Sikora # Date 1490516711 25200 # Sun Mar 26 01:25:11 2017 -0700 # Node ID 7e98d1dbb9ffc83a4ae621e05f8ebdc23fdf3b70 # Parent 22be63bf21edaa1b8ea916c7d8cd4e5fe4892061 HTTP/2: add debug logging of pseudo-headers and cookies. Signed-off-by: Piotr Sikora diff -r 22be63bf21ed -r 7e98d1dbb9ff src/http/v2/ngx_http_v2.c --- a/src/http/v2/ngx_http_v2.c +++ b/src/http/v2/ngx_http_v2.c @@ -1585,6 +1585,10 @@ ngx_http_v2_state_process_header(ngx_htt rc = ngx_http_v2_pseudo_header(r, header); if (rc == NGX_OK) { + ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, + "http2 http header: \":%V: %V\"", + &header->name, &header->value); + return ngx_http_v2_state_header_complete(h2c, pos, end); } @@ -1626,6 +1630,10 @@ ngx_http_v2_state_process_header(ngx_htt NGX_HTTP_V2_INTERNAL_ERROR); } + ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, + "http2 http header: \"%V: %V\"", + &header->name, &header->value); + return ngx_http_v2_state_header_complete(h2c, pos, end); } From vbart at nginx.com Sun Apr 9 13:31:39 2017 From: vbart at nginx.com (Valentin V. Bartenev) Date: Sun, 09 Apr 2017 16:31:39 +0300 Subject: [PATCH] HTTP/2: add fast-path for HTTP/2 requests without request body In-Reply-To: References: <1959760.0ShWjv0uEp@vbart-workstation> <3274060.dBGtzE6Y78@vbart-workstation> Message-ID: <1875376.XcxCaH036Z@vbart-laptop> On Saturday 08 April 2017 21:17:26 Piotr Sikora via nginx-devel wrote: > Hey Valentin, > > > With your patch the behavior is different in these cases: > > > > GET / HTTP/1.1 > > Host: example.com > > Transfer-Encoding: chunked > > > > 0 > > > > and > > > > HEADERS > > DATA length:0 END_STREAM > > That wasn't really the case I was optimizing for, but that's a good point. > > > Moreover, it depends on the time when DATA frame is processed: > > before ngx_http_read_request_body() call or after. > > Does it? Won't content handlers (and thus > ngx_http_v2_read_request_body()) be always called right after HEADERS > frame is processed? Request processing can be delayed (e.g. by the limit_req module). wbr, Valentin V. Bartenev From agentzh at gmail.com Mon Apr 10 02:13:55 2017 From: agentzh at gmail.com (Yichun Zhang (agentzh)) Date: Sun, 9 Apr 2017 19:13:55 -0700 Subject: [ANN] Test::Nginx 0.26 released Message-ID: Hi folks, I've just uploaded Test::Nginx 0.26 to CPAN: https://metacpan.org/release/Test-Nginx It will appear on the CPAN mirror near you in the next few hours or so. After that, you can install the module like below sudo cpan Test::Nginx or better, when you have the App::cpanminus module already installed: sudo cpanm Test::Nginx The highlights of this release is 1. The test scaffold makes it possible to run the test suite in multiple parallel jobs to utilize multiple CPU cores in the same system when the environment TEST_NGINX_RANDOMIZE=1 is specified and the -jN option is used in the prove command line (where N is an integer equal to the number of jobs). For example, ngx_http_echo_module and lua-resty-core's test suites can both run in multiple parallel jobs, greatly reducing the overall testing time on a multi-core system. 2. We now have the Test::Nginx::Socket::Lua::Dgram test class for testing datagram nginx servers in a declarative way. 3. We now have the new `--- response_body_filters` section to pre-process the *actual* response body received from the HTTP nginx server before doing any comparisons. For example, one can use a custom filter to calculate the MD5 checksum of a binary response body actually received from the server and then compare the MD5 checksum instead of the raw binary data. Special thanks go to all our contributors and developers! Here's the complete change log for this release (compared to the last CPAN release, 0.25): * feature: added new Test::Nginx::Socket::Lua::Dgram module for testing UDP/datagram nginx servers. * feature: added new section, `--- response_body_filters`, to allow custom value filters applied upon the *actual* response body data before matching against the expected values. thanks detailyang for the patch. * feature: added support for env TEST_NGINX_RANDOMIZE, which when set allows parallel testing via `prove -jN`. * feature: added support for the `$TEST_NGINX_SERVER_ROOT` special macro variable in test block specs. * feature: allows extracting nginx version numbers from more forked versions of nginx. * feature: support the "SKIP" section dynamically defined by subclasses of the test scaffold calsses. * feature: `--- tcp_reply` section: allows perl subroutines as section values. thanks Robert Paprocki for the patch. * bugfix: fixed the TEST_NGINX_BINARY environment for specifying nginx binary path. thanks Thibault Charbonnier for the patch. * bugfix: ensure that kill_process() still kills the process with force if the process is still running after sending SIGQUIT. * improve: improved the nginx shut down logic. thanks Dejiang Zhu for the suggestion. * improve: improved the test message for ARRAY-typed "response_body" section values. * improve: improved the dry run skip message for no_error_log. * doc: typo fixes from Juntong Fu. This Perl module provides a test scaffold based on IO::Socket for automated testing in Nginx C module or ngx_lua-based Lua library development. This class inherits from Test::Base, thus bringing all its declarative power to the Nginx C module testing practices. Please check out the full documentation on CPAN: https://metacpan.org/pod/Test::Nginx::Socket as well as the official user guide in the book "Programming OpenResty": https://openresty.gitbooks.io/programming-openresty/content/testing/ All of our Nginx modules (as well as our lua-resty-* libraries) are using Test::Nginx to drive their test suites. And it is also driving my test cluster running on Amazon EC2: http://qa.openresty.org Please note that this module is completely different from the Test::Nginx module created by Maxim Dounin. The git repository for this Perl module is hosted on GitHub: https://github.com/openresty/test-nginx Enjoy! Best regards, -agentzh From contact at leblanc-simon.eu Tue Apr 11 01:48:12 2017 From: contact at leblanc-simon.eu (Simon Leblanc) Date: Tue, 11 Apr 2017 03:48:12 +0200 Subject: [PATCH] Added support for the 308 Permanent Redirect Message-ID: <3a823d3fcd1cea201c38.1491875292@leviathan-fast-desktop> # HG changeset patch # User Simon Leblanc # Date 1491873226 -7200 # Tue Apr 11 03:13:46 2017 +0200 # Node ID 3a823d3fcd1cea201c3839e5b960acbfdb7baf87 # Parent 29ba1d6a2da9320e68ef2b7a2516c4c424672ea8 Added support for the 308 Permanent Redirect diff -r 29ba1d6a2da9 -r 3a823d3fcd1c src/http/modules/ngx_http_headers_filter_module.c --- a/src/http/modules/ngx_http_headers_filter_module.c Tue Apr 04 18:01:57 2017 +0300 +++ b/src/http/modules/ngx_http_headers_filter_module.c Tue Apr 11 03:13:46 2017 +0200 @@ -173,6 +173,7 @@ case NGX_HTTP_SEE_OTHER: case NGX_HTTP_NOT_MODIFIED: case NGX_HTTP_TEMPORARY_REDIRECT: + case NGX_HTTP_PERMANENT_REDIRECT: safe_status = 1; break; diff -r 29ba1d6a2da9 -r 3a823d3fcd1c src/http/ngx_http_core_module.c --- a/src/http/ngx_http_core_module.c Tue Apr 04 18:01:57 2017 +0300 +++ b/src/http/ngx_http_core_module.c Tue Apr 11 03:13:46 2017 +0200 @@ -1894,7 +1894,8 @@ if (status == NGX_HTTP_MOVED_PERMANENTLY || status == NGX_HTTP_MOVED_TEMPORARILY || status == NGX_HTTP_SEE_OTHER - || status == NGX_HTTP_TEMPORARY_REDIRECT) + || status == NGX_HTTP_TEMPORARY_REDIRECT + || status == NGX_HTTP_PERMANENT_REDIRECT) { ngx_http_clear_location(r); diff -r 29ba1d6a2da9 -r 3a823d3fcd1c src/http/ngx_http_header_filter_module.c --- a/src/http/ngx_http_header_filter_module.c Tue Apr 04 18:01:57 2017 +0300 +++ b/src/http/ngx_http_header_filter_module.c Tue Apr 11 03:13:46 2017 +0200 @@ -75,8 +75,9 @@ ngx_null_string, /* "305 Use Proxy" */ ngx_null_string, /* "306 unused" */ ngx_string("307 Temporary Redirect"), + ngx_string("308 Permanent Redirect"), -#define NGX_HTTP_LAST_3XX 308 +#define NGX_HTTP_LAST_3XX 309 #define NGX_HTTP_OFF_4XX (NGX_HTTP_LAST_3XX - 301 + NGX_HTTP_OFF_3XX) ngx_string("400 Bad Request"), diff -r 29ba1d6a2da9 -r 3a823d3fcd1c src/http/ngx_http_request.h --- a/src/http/ngx_http_request.h Tue Apr 04 18:01:57 2017 +0300 +++ b/src/http/ngx_http_request.h Tue Apr 11 03:13:46 2017 +0200 @@ -83,6 +83,7 @@ #define NGX_HTTP_SEE_OTHER 303 #define NGX_HTTP_NOT_MODIFIED 304 #define NGX_HTTP_TEMPORARY_REDIRECT 307 +#define NGX_HTTP_PERMANENT_REDIRECT 308 #define NGX_HTTP_BAD_REQUEST 400 #define NGX_HTTP_UNAUTHORIZED 401 diff -r 29ba1d6a2da9 -r 3a823d3fcd1c src/http/ngx_http_special_response.c --- a/src/http/ngx_http_special_response.c Tue Apr 04 18:01:57 2017 +0300 +++ b/src/http/ngx_http_special_response.c Tue Apr 11 03:13:46 2017 +0200 @@ -89,6 +89,14 @@ ; +static char ngx_http_error_308_page[] = +"" CRLF +"308 Permanent Redirect" CRLF +"" CRLF +"

308 Permanent Redirect

" CRLF +; + + static char ngx_http_error_400_page[] = "" CRLF "400 Bad Request" CRLF @@ -336,8 +344,9 @@ ngx_null_string, /* 305 */ ngx_null_string, /* 306 */ ngx_string(ngx_http_error_307_page), + ngx_string(ngx_http_error_308_page), -#define NGX_HTTP_LAST_3XX 308 +#define NGX_HTTP_LAST_3XX 309 #define NGX_HTTP_OFF_4XX (NGX_HTTP_LAST_3XX - 301 + NGX_HTTP_OFF_3XX) ngx_string(ngx_http_error_400_page), @@ -615,7 +624,8 @@ if (overwrite != NGX_HTTP_MOVED_PERMANENTLY && overwrite != NGX_HTTP_MOVED_TEMPORARILY && overwrite != NGX_HTTP_SEE_OTHER - && overwrite != NGX_HTTP_TEMPORARY_REDIRECT) + && overwrite != NGX_HTTP_TEMPORARY_REDIRECT + && overwrite != NGX_HTTP_PERMANENT_REDIRECT) { r->err_status = NGX_HTTP_MOVED_TEMPORARILY; } From contact at leblanc-simon.eu Tue Apr 11 01:59:05 2017 From: contact at leblanc-simon.eu (Simon Leblanc) Date: Tue, 11 Apr 2017 03:59:05 +0200 Subject: [PATCH] Added support for the 308 Permanent Redirect In-Reply-To: <3a823d3fcd1cea201c38.1491875292@leviathan-fast-desktop> References: <3a823d3fcd1cea201c38.1491875292@leviathan-fast-desktop> Message-ID: <001d1add-d26f-8229-316a-c3437354cb76@leblanc-simon.eu> Hello ! this patch add support for the 308 Permanent Redirect (RFC 7538 ). Browser compatibility is good now : It allow to close ticket 877 : I haven't found any message in the mailing list that lets me think you don"t want to integrate this feature. I hope my patch is correct. Best regards, Simon Leblanc -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 200 bytes Desc: OpenPGP digital signature URL: From contact at leblanc-simon.eu Tue Apr 11 02:08:59 2017 From: contact at leblanc-simon.eu (Simon Leblanc) Date: Tue, 11 Apr 2017 04:08:59 +0200 Subject: [PATCH] Added support for the 308 Permanent Redirect - Perl module In-Reply-To: <001d1add-d26f-8229-316a-c3437354cb76@leblanc-simon.eu> References: <3a823d3fcd1cea201c38.1491875292@leviathan-fast-desktop> <001d1add-d26f-8229-316a-c3437354cb76@leblanc-simon.eu> Message-ID: # HG changeset patch # User Simon Leblanc # Date 1491876406 -7200 # Tue Apr 11 04:06:46 2017 +0200 # Node ID 44e7f74669453910229f1a48f014d9dbd97e28f1 # Parent 3a823d3fcd1cea201c3839e5b960acbfdb7baf87 Added support for the 308 Permanent Redirect - Perl module diff -r 3a823d3fcd1c -r 44e7f7466945 src/http/modules/perl/nginx.pm --- a/src/http/modules/perl/nginx.pm Tue Apr 11 03:13:46 2017 +0200 +++ b/src/http/modules/perl/nginx.pm Tue Apr 11 04:06:46 2017 +0200 @@ -24,6 +24,7 @@ HTTP_SEE_OTHER HTTP_NOT_MODIFIED HTTP_TEMPORARY_REDIRECT + HTTP_PERMANENT_REDIRECT HTTP_BAD_REQUEST HTTP_UNAUTHORIZED @@ -72,6 +73,7 @@ use constant HTTP_SEE_OTHER => 303; use constant HTTP_NOT_MODIFIED => 304; use constant HTTP_TEMPORARY_REDIRECT => 307; +use constant HTTP_PERMANENT_REDIRECT => 308; use constant HTTP_BAD_REQUEST => 400; use constant HTTP_UNAUTHORIZED => 401; From mdounin at mdounin.ru Wed Apr 12 15:08:44 2017 From: mdounin at mdounin.ru (Maxim Dounin) Date: Wed, 12 Apr 2017 15:08:44 +0000 Subject: [nginx] Stable branch. Message-ID: details: http://hg.nginx.org/nginx/rev/92a5bbb7c727 branches: stable-1.12 changeset: 6969:92a5bbb7c727 user: Maxim Dounin date: Wed Apr 12 16:42:30 2017 +0300 description: Stable branch. diffstat: src/core/nginx.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (14 lines): diff --git a/src/core/nginx.h b/src/core/nginx.h --- a/src/core/nginx.h +++ b/src/core/nginx.h @@ -9,8 +9,8 @@ #define _NGINX_H_INCLUDED_ -#define nginx_version 1011013 -#define NGINX_VERSION "1.11.13" +#define nginx_version 1012000 +#define NGINX_VERSION "1.12.0" #define NGINX_VER "nginx/" NGINX_VERSION #ifdef NGX_BUILD From mdounin at mdounin.ru Wed Apr 12 15:08:46 2017 From: mdounin at mdounin.ru (Maxim Dounin) Date: Wed, 12 Apr 2017 15:08:46 +0000 Subject: [nginx] nginx-1.12.0-RELEASE Message-ID: details: http://hg.nginx.org/nginx/rev/e265d962841f branches: stable-1.12 changeset: 6970:e265d962841f user: Maxim Dounin date: Wed Apr 12 17:46:00 2017 +0300 description: nginx-1.12.0-RELEASE diffstat: docs/xml/nginx/changes.xml | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diffs (24 lines): diff --git a/docs/xml/nginx/changes.xml b/docs/xml/nginx/changes.xml --- a/docs/xml/nginx/changes.xml +++ b/docs/xml/nginx/changes.xml @@ -5,6 +5,20 @@ + + + + +?????????? ????? 1.12.x. + + +1.12.x stable branch. + + + + + + From mdounin at mdounin.ru Wed Apr 12 15:08:49 2017 From: mdounin at mdounin.ru (Maxim Dounin) Date: Wed, 12 Apr 2017 15:08:49 +0000 Subject: [nginx] release-1.12.0 tag Message-ID: details: http://hg.nginx.org/nginx/rev/f1b6cfe7459f branches: stable-1.12 changeset: 6971:f1b6cfe7459f user: Maxim Dounin date: Wed Apr 12 17:46:00 2017 +0300 description: release-1.12.0 tag diffstat: .hgtags | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (8 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -412,3 +412,4 @@ 1ad0999a7ded3d4fb01c7acf8ff57c80b643da7e d8b321a876d6254e9e98795e3b194ef053290354 release-1.11.11 7f394e433f0003222aa6531931ecc0b24740d5e4 release-1.11.12 3d0e8655f897959e48cc74e87670bb5492a58871 release-1.11.13 +e265d962841f90f1fa148c8f4eed4a4d3a9b0208 release-1.12.0 From ru at nginx.com Wed Apr 12 19:21:54 2017 From: ru at nginx.com (Ruslan Ermilov) Date: Wed, 12 Apr 2017 19:21:54 +0000 Subject: [nginx] Version bump. Message-ID: details: http://hg.nginx.org/nginx/rev/6e8c249b34ea branches: changeset: 6972:6e8c249b34ea user: Ruslan Ermilov date: Wed Apr 12 22:14:24 2017 +0300 description: Version bump. diffstat: src/core/nginx.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (14 lines): diff -r 29ba1d6a2da9 -r 6e8c249b34ea src/core/nginx.h --- a/src/core/nginx.h Tue Apr 04 18:01:57 2017 +0300 +++ b/src/core/nginx.h Wed Apr 12 22:14:24 2017 +0300 @@ -9,8 +9,8 @@ #define _NGINX_H_INCLUDED_ -#define nginx_version 1011013 -#define NGINX_VERSION "1.11.13" +#define nginx_version 1013000 +#define NGINX_VERSION "1.13.0" #define NGINX_VER "nginx/" NGINX_VERSION #ifdef NGX_BUILD From ru at nginx.com Wed Apr 12 19:21:57 2017 From: ru at nginx.com (Ruslan Ermilov) Date: Wed, 12 Apr 2017 19:21:57 +0000 Subject: [nginx] Use ngx_calloc_buf() where appropriate. Message-ID: details: http://hg.nginx.org/nginx/rev/99934aade555 branches: changeset: 6973:99934aade555 user: Ruslan Ermilov date: Wed Apr 12 22:21:04 2017 +0300 description: Use ngx_calloc_buf() where appropriate. diffstat: src/http/modules/ngx_http_flv_module.c | 4 ++-- src/http/modules/ngx_http_gzip_filter_module.c | 2 +- src/http/modules/ngx_http_gzip_static_module.c | 2 +- src/http/modules/ngx_http_image_filter_module.c | 6 +++--- src/http/modules/ngx_http_mp4_module.c | 2 +- src/http/modules/ngx_http_static_module.c | 2 +- src/http/modules/ngx_http_xslt_filter_module.c | 2 +- src/http/ngx_http_core_module.c | 2 +- src/http/ngx_http_file_cache.c | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diffs (135 lines): diff -r 6e8c249b34ea -r 99934aade555 src/http/modules/ngx_http_flv_module.c --- a/src/http/modules/ngx_http_flv_module.c Wed Apr 12 22:14:24 2017 +0300 +++ b/src/http/modules/ngx_http_flv_module.c Wed Apr 12 22:21:04 2017 +0300 @@ -203,7 +203,7 @@ ngx_http_flv_handler(ngx_http_request_t } if (i == 0) { - b = ngx_pcalloc(r->pool, sizeof(ngx_buf_t)); + b = ngx_calloc_buf(r->pool); if (b == NULL) { return NGX_HTTP_INTERNAL_SERVER_ERROR; } @@ -217,7 +217,7 @@ ngx_http_flv_handler(ngx_http_request_t } - b = ngx_pcalloc(r->pool, sizeof(ngx_buf_t)); + b = ngx_calloc_buf(r->pool); if (b == NULL) { return NGX_HTTP_INTERNAL_SERVER_ERROR; } diff -r 6e8c249b34ea -r 99934aade555 src/http/modules/ngx_http_gzip_filter_module.c --- a/src/http/modules/ngx_http_gzip_filter_module.c Wed Apr 12 22:14:24 2017 +0300 +++ b/src/http/modules/ngx_http_gzip_filter_module.c Wed Apr 12 22:21:04 2017 +0300 @@ -644,7 +644,7 @@ ngx_http_gzip_filter_gzheader(ngx_http_r static u_char gzheader[10] = { 0x1f, 0x8b, Z_DEFLATED, 0, 0, 0, 0, 0, 0, 3 }; - b = ngx_pcalloc(r->pool, sizeof(ngx_buf_t)); + b = ngx_calloc_buf(r->pool); if (b == NULL) { return NGX_ERROR; } diff -r 6e8c249b34ea -r 99934aade555 src/http/modules/ngx_http_gzip_static_module.c --- a/src/http/modules/ngx_http_gzip_static_module.c Wed Apr 12 22:14:24 2017 +0300 +++ b/src/http/modules/ngx_http_gzip_static_module.c Wed Apr 12 22:21:04 2017 +0300 @@ -248,7 +248,7 @@ ngx_http_gzip_static_handler(ngx_http_re /* we need to allocate all before the header would be sent */ - b = ngx_pcalloc(r->pool, sizeof(ngx_buf_t)); + b = ngx_calloc_buf(r->pool); if (b == NULL) { return NGX_HTTP_INTERNAL_SERVER_ERROR; } diff -r 6e8c249b34ea -r 99934aade555 src/http/modules/ngx_http_image_filter_module.c --- a/src/http/modules/ngx_http_image_filter_module.c Wed Apr 12 22:14:24 2017 +0300 +++ b/src/http/modules/ngx_http_image_filter_module.c Wed Apr 12 22:21:04 2017 +0300 @@ -581,7 +581,7 @@ ngx_http_image_json(ngx_http_request_t * size_t len; ngx_buf_t *b; - b = ngx_pcalloc(r->pool, sizeof(ngx_buf_t)); + b = ngx_calloc_buf(r->pool); if (b == NULL) { return NULL; } @@ -633,7 +633,7 @@ ngx_http_image_asis(ngx_http_request_t * { ngx_buf_t *b; - b = ngx_pcalloc(r->pool, sizeof(ngx_buf_t)); + b = ngx_calloc_buf(r->pool); if (b == NULL) { return NULL; } @@ -1067,7 +1067,7 @@ transparent: return NULL; } - b = ngx_pcalloc(r->pool, sizeof(ngx_buf_t)); + b = ngx_calloc_buf(r->pool); if (b == NULL) { gdFree(out); return NULL; diff -r 6e8c249b34ea -r 99934aade555 src/http/modules/ngx_http_mp4_module.c --- a/src/http/modules/ngx_http_mp4_module.c Wed Apr 12 22:14:24 2017 +0300 +++ b/src/http/modules/ngx_http_mp4_module.c Wed Apr 12 22:21:04 2017 +0300 @@ -636,7 +636,7 @@ ngx_http_mp4_handler(ngx_http_request_t } if (mp4 == NULL) { - b = ngx_pcalloc(r->pool, sizeof(ngx_buf_t)); + b = ngx_calloc_buf(r->pool); if (b == NULL) { return NGX_HTTP_INTERNAL_SERVER_ERROR; } diff -r 6e8c249b34ea -r 99934aade555 src/http/modules/ngx_http_static_module.c --- a/src/http/modules/ngx_http_static_module.c Wed Apr 12 22:14:24 2017 +0300 +++ b/src/http/modules/ngx_http_static_module.c Wed Apr 12 22:21:04 2017 +0300 @@ -233,7 +233,7 @@ ngx_http_static_handler(ngx_http_request /* we need to allocate all before the header would be sent */ - b = ngx_pcalloc(r->pool, sizeof(ngx_buf_t)); + b = ngx_calloc_buf(r->pool); if (b == NULL) { return NGX_HTTP_INTERNAL_SERVER_ERROR; } diff -r 6e8c249b34ea -r 99934aade555 src/http/modules/ngx_http_xslt_filter_module.c --- a/src/http/modules/ngx_http_xslt_filter_module.c Wed Apr 12 22:14:24 2017 +0300 +++ b/src/http/modules/ngx_http_xslt_filter_module.c Wed Apr 12 22:21:04 2017 +0300 @@ -584,7 +584,7 @@ ngx_http_xslt_apply_stylesheet(ngx_http_ return NULL; } - b = ngx_pcalloc(r->pool, sizeof(ngx_buf_t)); + b = ngx_calloc_buf(r->pool); if (b == NULL) { ngx_free(buf); return NULL; diff -r 6e8c249b34ea -r 99934aade555 src/http/ngx_http_core_module.c --- a/src/http/ngx_http_core_module.c Wed Apr 12 22:14:24 2017 +0300 +++ b/src/http/ngx_http_core_module.c Wed Apr 12 22:21:04 2017 +0300 @@ -1926,7 +1926,7 @@ ngx_http_send_response(ngx_http_request_ return ngx_http_send_header(r); } - b = ngx_pcalloc(r->pool, sizeof(ngx_buf_t)); + b = ngx_calloc_buf(r->pool); if (b == NULL) { return NGX_HTTP_INTERNAL_SERVER_ERROR; } diff -r 6e8c249b34ea -r 99934aade555 src/http/ngx_http_file_cache.c --- a/src/http/ngx_http_file_cache.c Wed Apr 12 22:14:24 2017 +0300 +++ b/src/http/ngx_http_file_cache.c Wed Apr 12 22:21:04 2017 +0300 @@ -1577,7 +1577,7 @@ ngx_http_cache_send(ngx_http_request_t * /* we need to allocate all before the header would be sent */ - b = ngx_pcalloc(r->pool, sizeof(ngx_buf_t)); + b = ngx_calloc_buf(r->pool); if (b == NULL) { return NGX_HTTP_INTERNAL_SERVER_ERROR; } From vbart at nginx.com Wed Apr 12 19:48:13 2017 From: vbart at nginx.com (Valentin Bartenev) Date: Wed, 12 Apr 2017 19:48:13 +0000 Subject: [nginx] Core: improved JSON escaping. Message-ID: details: http://hg.nginx.org/nginx/rev/289403abc84e branches: changeset: 6974:289403abc84e user: Valentin Bartenev date: Wed Apr 12 22:47:57 2017 +0300 description: Core: improved JSON escaping. Two-character representations are now used for \b, \f, \n, \r, and \t. diffstat: src/core/ngx_string.c | 51 ++++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 44 insertions(+), 7 deletions(-) diffs (68 lines): diff -r 99934aade555 -r 289403abc84e src/core/ngx_string.c --- a/src/core/ngx_string.c Wed Apr 12 22:21:04 2017 +0300 +++ b/src/core/ngx_string.c Wed Apr 12 22:47:57 2017 +0300 @@ -1808,7 +1808,19 @@ ngx_escape_json(u_char *dst, u_char *src len++; } else if (ch <= 0x1f) { - len += sizeof("\\u001F") - 2; + + switch (ch) { + case '\n': + case '\r': + case '\t': + case '\b': + case '\f': + len++; + break; + + default: + len += sizeof("\\u001F") - 2; + } } size--; @@ -1829,12 +1841,37 @@ ngx_escape_json(u_char *dst, u_char *src *dst++ = ch; } else { - *dst++ = '\\'; *dst++ = 'u'; *dst++ = '0'; *dst++ = '0'; - *dst++ = '0' + (ch >> 4); - - ch &= 0xf; - - *dst++ = (ch < 10) ? ('0' + ch) : ('A' + ch - 10); + *dst++ = '\\'; + + switch (ch) { + case '\n': + *dst++ = 'n'; + break; + + case '\r': + *dst++ = 'r'; + break; + + case '\t': + *dst++ = 't'; + break; + + case '\b': + *dst++ = 'b'; + break; + + case '\f': + *dst++ = 'f'; + break; + + default: + *dst++ = 'u'; *dst++ = '0'; *dst++ = '0'; + *dst++ = '0' + (ch >> 4); + + ch &= 0xf; + + *dst++ = (ch < 10) ? ('0' + ch) : ('A' + ch - 10); + } } size--; From vl at nginx.com Thu Apr 13 09:09:12 2017 From: vl at nginx.com (Vladimir Homutov) Date: Thu, 13 Apr 2017 09:09:12 +0000 Subject: [nginx] Stream: configurable socket buffer sizes. Message-ID: details: http://hg.nginx.org/nginx/rev/d7ce41bdf050 branches: changeset: 6975:d7ce41bdf050 user: Vladimir Homutov date: Mon Apr 03 17:29:19 2017 +0300 description: Stream: configurable socket buffer sizes. The "rcvbuf" and "sndbuf" parameters are now supported by the "listen" directive. diffstat: src/stream/ngx_stream.c | 2 ++ src/stream/ngx_stream.h | 2 ++ src/stream/ngx_stream_core_module.c | 36 +++++++++++++++++++++++++++++++++++- 3 files changed, 39 insertions(+), 1 deletions(-) diffs (84 lines): diff -r 289403abc84e -r d7ce41bdf050 src/stream/ngx_stream.c --- a/src/stream/ngx_stream.c Wed Apr 12 22:47:57 2017 +0300 +++ b/src/stream/ngx_stream.c Mon Apr 03 17:29:19 2017 +0300 @@ -494,6 +494,8 @@ ngx_stream_optimize_servers(ngx_conf_t * ls->log.handler = ngx_accept_log_error; ls->backlog = addr[i].opt.backlog; + ls->rcvbuf = addr[i].opt.rcvbuf; + ls->sndbuf = addr[i].opt.sndbuf; ls->wildcard = addr[i].opt.wildcard; diff -r 289403abc84e -r d7ce41bdf050 src/stream/ngx_stream.h --- a/src/stream/ngx_stream.h Wed Apr 12 22:47:57 2017 +0300 +++ b/src/stream/ngx_stream.h Mon Apr 03 17:29:19 2017 +0300 @@ -62,6 +62,8 @@ typedef struct { int tcp_keepcnt; #endif int backlog; + int rcvbuf; + int sndbuf; int type; } ngx_stream_listen_t; diff -r 289403abc84e -r d7ce41bdf050 src/stream/ngx_stream_core_module.c --- a/src/stream/ngx_stream_core_module.c Wed Apr 12 22:47:57 2017 +0300 +++ b/src/stream/ngx_stream_core_module.c Mon Apr 03 17:29:19 2017 +0300 @@ -582,7 +582,7 @@ ngx_stream_core_listen(ngx_conf_t *cf, n { ngx_stream_core_srv_conf_t *cscf = conf; - ngx_str_t *value; + ngx_str_t *value, size; ngx_url_t u; ngx_uint_t i, backlog; ngx_stream_listen_t *ls, *als; @@ -620,6 +620,8 @@ ngx_stream_core_listen(ngx_conf_t *cf, n ls->socklen = u.socklen; ls->backlog = NGX_LISTEN_BACKLOG; + ls->rcvbuf = -1; + ls->sndbuf = -1; ls->type = SOCK_STREAM; ls->wildcard = u.wildcard; ls->ctx = cf->ctx; @@ -659,6 +661,38 @@ ngx_stream_core_listen(ngx_conf_t *cf, n continue; } + if (ngx_strncmp(value[i].data, "rcvbuf=", 7) == 0) { + size.len = value[i].len - 7; + size.data = value[i].data + 7; + + ls->rcvbuf = ngx_parse_size(&size); + ls->bind = 1; + + if (ls->rcvbuf == NGX_ERROR) { + ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, + "invalid rcvbuf \"%V\"", &value[i]); + return NGX_CONF_ERROR; + } + + continue; + } + + if (ngx_strncmp(value[i].data, "sndbuf=", 7) == 0) { + size.len = value[i].len - 7; + size.data = value[i].data + 7; + + ls->sndbuf = ngx_parse_size(&size); + ls->bind = 1; + + if (ls->sndbuf == NGX_ERROR) { + ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, + "invalid sndbuf \"%V\"", &value[i]); + return NGX_CONF_ERROR; + } + + continue; + } + if (ngx_strncmp(value[i].data, "ipv6only=o", 10) == 0) { #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY) size_t len; From vl at nginx.com Thu Apr 13 09:09:15 2017 From: vl at nginx.com (Vladimir Homutov) Date: Thu, 13 Apr 2017 09:09:15 +0000 Subject: [nginx] Mail: configurable socket buffer sizes. Message-ID: details: http://hg.nginx.org/nginx/rev/6c13008ad503 branches: changeset: 6976:6c13008ad503 user: Vladimir Homutov date: Mon Apr 03 17:30:34 2017 +0300 description: Mail: configurable socket buffer sizes. The "rcvbuf" and "sndbuf" parameters are now supported by the "listen" directive. diffstat: src/mail/ngx_mail.c | 2 ++ src/mail/ngx_mail.h | 2 ++ src/mail/ngx_mail_core_module.c | 36 +++++++++++++++++++++++++++++++++++- 3 files changed, 39 insertions(+), 1 deletions(-) diffs (84 lines): diff -r d7ce41bdf050 -r 6c13008ad503 src/mail/ngx_mail.c --- a/src/mail/ngx_mail.c Mon Apr 03 17:29:19 2017 +0300 +++ b/src/mail/ngx_mail.c Mon Apr 03 17:30:34 2017 +0300 @@ -333,6 +333,8 @@ ngx_mail_optimize_servers(ngx_conf_t *cf ls->log.handler = ngx_accept_log_error; ls->backlog = addr[i].opt.backlog; + ls->rcvbuf = addr[i].opt.rcvbuf; + ls->sndbuf = addr[i].opt.sndbuf; ls->keepalive = addr[i].opt.so_keepalive; #if (NGX_HAVE_KEEPALIVE_TUNABLE) diff -r d7ce41bdf050 -r 6c13008ad503 src/mail/ngx_mail.h --- a/src/mail/ngx_mail.h Mon Apr 03 17:29:19 2017 +0300 +++ b/src/mail/ngx_mail.h Mon Apr 03 17:30:34 2017 +0300 @@ -46,6 +46,8 @@ typedef struct { int tcp_keepcnt; #endif int backlog; + int rcvbuf; + int sndbuf; } ngx_mail_listen_t; diff -r d7ce41bdf050 -r 6c13008ad503 src/mail/ngx_mail_core_module.c --- a/src/mail/ngx_mail_core_module.c Mon Apr 03 17:29:19 2017 +0300 +++ b/src/mail/ngx_mail_core_module.c Mon Apr 03 17:30:34 2017 +0300 @@ -295,7 +295,7 @@ ngx_mail_core_listen(ngx_conf_t *cf, ngx { ngx_mail_core_srv_conf_t *cscf = conf; - ngx_str_t *value; + ngx_str_t *value, size; ngx_url_t u; ngx_uint_t i, m; ngx_mail_listen_t *ls; @@ -350,6 +350,8 @@ ngx_mail_core_listen(ngx_conf_t *cf, ngx ls->socklen = u.socklen; ls->backlog = NGX_LISTEN_BACKLOG; + ls->rcvbuf = -1; + ls->sndbuf = -1; ls->wildcard = u.wildcard; ls->ctx = cf->ctx; @@ -398,6 +400,38 @@ ngx_mail_core_listen(ngx_conf_t *cf, ngx continue; } + if (ngx_strncmp(value[i].data, "rcvbuf=", 7) == 0) { + size.len = value[i].len - 7; + size.data = value[i].data + 7; + + ls->rcvbuf = ngx_parse_size(&size); + ls->bind = 1; + + if (ls->rcvbuf == NGX_ERROR) { + ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, + "invalid rcvbuf \"%V\"", &value[i]); + return NGX_CONF_ERROR; + } + + continue; + } + + if (ngx_strncmp(value[i].data, "sndbuf=", 7) == 0) { + size.len = value[i].len - 7; + size.data = value[i].data + 7; + + ls->sndbuf = ngx_parse_size(&size); + ls->bind = 1; + + if (ls->sndbuf == NGX_ERROR) { + ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, + "invalid sndbuf \"%V\"", &value[i]); + return NGX_CONF_ERROR; + } + + continue; + } + if (ngx_strncmp(value[i].data, "ipv6only=o", 10) == 0) { #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY) size_t len; From mdounin at mdounin.ru Thu Apr 13 17:24:07 2017 From: mdounin at mdounin.ru (Maxim Dounin) Date: Thu, 13 Apr 2017 20:24:07 +0300 Subject: [PATCH 1 of 3] SSI: Implement #fsize SSI command In-Reply-To: References: Message-ID: <20170413172406.GM13617@mdounin.ru> Hello! Sorry for late response. See comments below. On Fri, Mar 10, 2017 at 12:10:32PM +0300, Matwey V. Kornilov wrote: > # HG changeset patch > # User Matwey V. Kornilov > # Date 1489136573 -10800 > # Fri Mar 10 12:02:53 2017 +0300 > # Branch fsize > # Node ID a682e88cdcddb04905814cdfacde3df9ebc2b48b > # Parent 640f035293959b2d4b0ba5939d954bc517f57f77 > SSI: Implement #fsize SSI command Style, should be: SSI: implemented "fsize" SSI command. > > diff -r 640f03529395 -r a682e88cdcdd src/http/modules/ngx_http_ssi_filter_module.c > --- a/src/http/modules/ngx_http_ssi_filter_module.c Fri Jan 27 19:06:35 2017 +0300 > +++ b/src/http/modules/ngx_http_ssi_filter_module.c Fri Mar 10 12:02:53 2017 +0300 > @@ -89,6 +89,10 @@ > ngx_int_t rc); > static ngx_int_t ngx_http_ssi_set_variable(ngx_http_request_t *r, void *data, > ngx_int_t rc); > +static ngx_int_t ngx_http_ssi_fsize(ngx_http_request_t *r, > + ngx_http_ssi_ctx_t *ctx, ngx_str_t **params); > +static ngx_int_t ngx_http_ssi_fsize_output(ngx_http_request_t *r, void *data, > + ngx_int_t rc); > static ngx_int_t ngx_http_ssi_echo(ngx_http_request_t *r, > ngx_http_ssi_ctx_t *ctx, ngx_str_t **params); > static ngx_int_t ngx_http_ssi_config(ngx_http_request_t *r, > @@ -211,6 +215,7 @@ > > > static u_char ngx_http_ssi_string[] = "