Hi, Valentin. " Also please note that with your patch clients are still able to negotiate HTTP/2 even if nginx doesn't announce it. " Two points: 1. The patch forbids the clients explicitly not support HTTP/2 doing v2 ( ngx_http_v2_init). How to follow you mean of "with the patch, clients are still able to negotiate HTTP/2" 2. "even if nginx doesn't announce it"by karton - Nginx Development
Thanks. On Fri, Jun 9, 2017 at 1:09 AM, Valentin V. Bartenev <vbart@nginx.com> wrote: > On Friday 09 June 2017 00:08:06 洪志道 wrote: > > " > > > > For "https" resources, connection reuse additionally depends on > > having a certificate that is valid for the host in the URI. The > > certificate presented by the server MUST satisfby karton - Nginx Development
" For "https" resources, connection reuse additionally depends on having a certificate that is valid for the host in the URI. The certificate presented by the server MUST satisfy any checks that the client would perform when forming a new TLS connection for the host in the URI. " It seems the brower can prevent the unreasonable behavior. In reallity, It stby karton - Nginx Development
It sounds right. According to the same situation, how does http2 protocol force other virtual servers to process certificate (ssl handshake). Example: server { listen 443 http2; a.com; ssl_certi....; } server { listen 443 http2; b.com; ssl_certi....; } We assume sni is 'a.com', then the connection contains different requests with different domains. That b.com will escaby karton - Nginx Development
Sorry for the typo. diff -r 5e05118678af src/http/modules/ngx_http_ssl_module.c --- a/src/http/modules/ngx_http_ssl_module.c Mon May 29 23:33:38 2017 +0300 +++ b/src/http/modules/ngx_http_ssl_module.c Wed Jun 07 12:17:34 2017 -0400 @@ -234,6 +234,13 @@ offsetof(ngx_http_ssl_srv_conf_t, stapling_verify), NULL }, + { ngx_string("ssl_h2"), + NGX_HTTP_MAIN_CONF|NGX_HTby karton - Nginx Development
Hi! Now, http2 is enabled globally for 'listen' directive with ip:port. It seems it's possible to enable by server with sni, alpn, npn. Take a look, please. diff -r 5e05118678af src/http/modules/ngx_http_ssl_module.c --- a/src/http/modules/ngx_http_ssl_module.c Mon May 29 23:33:38 2017 +0300 +++ b/src/http/modules/ngx_http_ssl_module.c Wed Jun 07 12:17:34 2017 -0400 @@ -234,6 +234,13 @@ ofby karton - Nginx Development
Hi! Both 'greater' and 'less' are not the lowest priority operations, we may make a litter improvement as following. diff -r 29ba1d6a2da9 src/core/ngx_core.h --- a/src/core/ngx_core.h Tue Apr 04 18:01:57 2017 +0300 +++ b/src/core/ngx_core.h Fri Apr 28 11:27:41 2017 -0400 @@ -97,8 +97,8 @@ #define ngx_abs(value) (((value) >= 0) ? (value) : - (value)) -#define ngx_max(val1, val2) ((vaby karton - Nginx Development
Thank you for advice. Yep, we should improve scripts. Another tiny style. diff -r 4d874b4d82ed src/core/ngx_cycle.c --- a/src/core/ngx_cycle.c Thu Mar 16 20:38:31 2017 +0300 +++ b/src/core/ngx_cycle.c Sun Mar 19 00:59:36 2017 -0400 @@ -1046,7 +1046,6 @@ } return ngx_os_signal_process(cycle, sig, pid); - } 2017-03-19 5:22 GMT+08:00 Maxim Dounin <mdounin@mdounin.ru>: > Helloby karton - Nginx Development
Hi. diff -r 4d874b4d82ed src/core/ngx_cycle.c --- a/src/core/ngx_cycle.c Thu Mar 16 20:38:31 2017 +0300 +++ b/src/core/ngx_cycle.c Fri Mar 17 22:28:54 2017 -0400 @@ -979,39 +979,17 @@ } -void -ngx_delete_pidfile(ngx_cycle_t *cycle) -{ - u_char *name; - ngx_core_conf_t *ccf; - - ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module); - - name = ngx_neby karton - Nginx Development
Hi. It's easy to reproduce such problem that the master/worker process are running without the pid file. Step by step: 1. Start master process. > ./objs/nginx nginx.pid successfully create with content (23234) 2. Create an active connection, purpose for prevent previous master exit. > telnet 127.1 80 3. Quit the previous master, and it still alive for a while. > kill -Qby karton - Nginx Development
By the way, I'm confused by the problem I sent a few days ago. And I think there are also other users face the same problem. When we upgrade nginx, it produces the phenomenon that the nginx.pid file is deleted but the master and worker processes are still running. Inside nginx source, it seems nginx dose guarantee that pid file and master/worker processes are always exist together. What causes tby karton - Nginx Development
Hi! diff -r d45072375572 src/os/unix/ngx_process.c --- a/src/os/unix/ngx_process.c Tue Mar 07 18:51:17 2017 +0300 +++ b/src/os/unix/ngx_process.c Thu Mar 16 06:44:25 2017 -0400 @@ -306,7 +306,7 @@ } -void +static void ngx_signal_handler(int signo) { char *action; Thanks. B.R. _______________________________________________ nginx-devel mailing list nginx-devel@nginx.org httpby karton - Nginx Development
Hi! What causes the nginx.pid file doesn't exist but the master and worker process are still running? This situation happens when we upgrade nginx. kill -USR2 pid; sleep n; kill -QUIT oldpid; I check the code in ngx_pross_cycle.c and ngx_process.c, it seems nginx dose perfectly guarantee that pid file and master process are always exist together. Thanks so much. B.R. _________________________by karton - Nginx Development
Hi! http://stackoverflow.com/questions/42719939/why-http-2-stream-id-must-be-ascending Dose anyone know why http/2 stream id must be ascending? Thanks. B.R. _______________________________________________ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-develby karton - Nginx Development
We can close the topic. I review the previous infos, and I have already got the answer. Thanks! 2017-03-09 20:53 GMT+08:00 洪志道 <hongzhidao@gmail.com>: > "First of all, we can set timeout zero if need to exit immediately." > > It's not a good idea. > > 2017-03-09 20:52 GMT+08:00 洪志道 <hongzhidao@gmail.com>: > >> I get it. >> >>by karton - Nginx Development
"First of all, we can set timeout zero if need to exit immediately." It's not a good idea. 2017-03-09 20:52 GMT+08:00 洪志道 <hongzhidao@gmail.com>: > I get it. > > Yep, we can do the cleanup work in exit process or pool cleanup when > expired time happened. > > I keep my opinion that it's useful and helpful if we set *ngx_shutdown_event.cancelable > = 0by karton - Nginx Development
I get it. Yep, we can do the cleanup work in exit process or pool cleanup when expired time happened. I keep my opinion that it's useful and helpful if we set *ngx_shutdown_event.cancelable = 0.* First of all, we can set timeout zero if need to exit immediately. The key point is whether we need to invoke event handler like ngx_http_log_flush_handler. And I think it's more convenient to do theby karton - Nginx Development
Hi! It's possible that two masters exist at the same time. kill -USR2 pid; sleep(2); if [ -f ${oldbinpidfile} -a -f ${pidfile} ]; # New master doesn't success in two seconds kill -QUIT oldpid; fi We assume that the previous exist master is old, I want to know which master process the request that's accepted, maybe I can design the variable $master with value old or new. Is it possible to imby karton - Nginx Development
It works well now, thank you! 2017-02-16 22:14 GMT+08:00 Maxim Dounin <mdounin@mdounin.ru>: > Hello! > > On Thu, Feb 16, 2017 at 03:51:24PM +0800, 洪志道 wrote: > > > Hi. > > > > diff -r da46bfc484ef src/http/ngx_http_variables.c > > --- a/src/http/ngx_http_variables.c Mon Feb 13 21:45:01 2017 +0300 > > +++ b/src/http/ngx_http_variables.c Wed Feby karton - Nginx Development
Sorry, sent too much. 2017-02-16 16:00 GMT+08:00 洪志道 <hongzhidao@gmail.com>: > Hi! > > diff -r da46bfc484ef src/http/ngx_http_variables.c > --- a/src/http/ngx_http_variables.c Mon Feb 13 21:45:01 2017 +0300 > +++ b/src/http/ngx_http_variables.c Wed Feb 08 10:31:53 2017 +0800 > @@ -783,6 +783,10 @@ > ssize_t s, *sp; > ngx_str_t val; > > +by karton - Nginx Development
Hi! diff -r da46bfc484ef src/http/ngx_http_variables.c --- a/src/http/ngx_http_variables.c Mon Feb 13 21:45:01 2017 +0300 +++ b/src/http/ngx_http_variables.c Wed Feb 08 10:31:53 2017 +0800 @@ -783,6 +783,10 @@ ssize_t s, *sp; ngx_str_t val; + if (v->data == NULL) { + return; + } + val.len = v->len; val.data = v->data; The following will cause coreby karton - Nginx Development
Hi. diff -r da46bfc484ef src/http/ngx_http_variables.c --- a/src/http/ngx_http_variables.c Mon Feb 13 21:45:01 2017 +0300 +++ b/src/http/ngx_http_variables.c Wed Feb 08 10:31:53 2017 +0800 @@ -783,6 +783,10 @@ ssize_t s, *sp; ngx_str_t val; + if (v->data == NULL) { + return; + } + val.len = v->len; val.data = v->data; The following will cause coreby karton - Nginx Development
Thanks a lot for your reply. So we can regard the patch is right, but it's not recommended. Because it's more easily to break the request behavior in limiting rate. And the limit_rate variable is also deprecated though it's so useful that we can dynamically change the rate. 2017-02-14 21:11 GMT+08:00 Maxim Dounin <mdounin@mdounin.ru>: > Hello! > > On Tue, Feb 14, 2017 at 03:54:35by karton - Nginx Development
Hi! Dose nginx consider support setting variable about limit_rate_after? We can limit rate after $n bytes received from upstream. --- a/src/http/ngx_http_variables.c Mon Feb 13 21:45:01 2017 +0300 +++ b/src/http/ngx_http_variables.c Tue Feb 07 05:15:51 2017 +0800 @@ -321,6 +321,11 @@ offsetof(ngx_http_request_t, limit_rate), NGX_HTTP_VAR_CHANGEABLE|NGX_HTTP_VAR_NOCACHEABLE, 0 }, +by karton - Nginx Development
Hi! It's still a problem when the variable generated by map and including itself. For example: map $host $abc { default $abc; } server { listen 80; location / { return 200 $abc; } } Thanks. B.R~ 2016-12-09 2:46 GMT+08:00 Ruslan Ermilov <ru@nginx.com>: > details: http://hg.nginx.org/nginx/rev/ec10ce307dc0 > branches: > changeset: 6832:ec10ce307dc0 &by karton - Nginx Development
Hi! static ngx_int_t ngx_http_limit_req_init_zone(ngx_shm_zone_t *shm_zone, void *data) { ngx_http_limit_req_ctx_t *octx = data; size_t len; ngx_http_limit_req_ctx_t *ctx; ctx = shm_zone->data; if (octx) { if (ctx->key.value.len != octx->key.value.len || ngx_strncmp(ctx->key.value.data, octx->key.value.data,by karton - Nginx Development
Ok, thanks. 2016-10-21 21:04 GMT+08:00 Maxim Dounin <mdounin@mdounin.ru>: > Hello! > > On Fri, Oct 21, 2016 at 11:44:01AM +0800, 洪志道 wrote: > > > Hi! > > > > I run the following test. > > > > > cat test.t > > #!/usr/bin/perl > > > > use warnings; > > use strict; > > > > use File::Temp qw/ tempdir /; >by karton - Nginx Development
Hi! I run the following test. > cat test.t #!/usr/bin/perl use warnings; use strict; use File::Temp qw/ tempdir /; tempdir( 'nginx-test-XXXXXXXXXX', TMPDIR => 1 ) or die "Can't create temp directory: $!\n"; > prove test.t > ll -d /tmp/nginx-test* drwx------ 2 root root 4096 Oct 20 06:09 /tmp/nginx-test-8ZmZ2FksyP The same problem is exisby karton - Nginx Development
Hello! It seems the file njs/njs_nonrecursive_parser.c is unused. 2016-10-17 15:29 GMT+08:00 Piotr Sikora <piotrsikora@google.com>: > # HG changeset patch > # User Piotr Sikora <piotrsikora@google.com> > # Date 1476689340 25200 > # Mon Oct 17 00:29:00 2016 -0700 > # Node ID 11abc80a5a442b56ee0618834b88510369a765d6 > # Parent 8046b999aaaf95980e89a6d0620657bc41by karton - Nginx Development
Hello! It's a common case that all the worker processes are still live while the master process isn't exist. So I think nginx should continue to work as Maxim said. Btw, we noticed that nginx.pid is deleted when we do the upgrade command. kill -USR2 nginx.pid; sleep(2); kill -HUP nginx.oldpid; What reason? Thanks. B.R~ 2016-10-13 11:04 GMT+08:00 Maxim Dounin <mdounin@mdounin.ru>: >by karton - Nginx Development