Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package nginx for openSUSE:Factory checked 
in at 2021-04-22 18:03:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/nginx (Old)
 and      /work/SRC/openSUSE:Factory/.nginx.new.12324 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "nginx"

Thu Apr 22 18:03:26 2021 rev:63 rq:887093 version:1.20.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/nginx/nginx.changes      2021-04-08 
22:13:01.689530194 +0200
+++ /work/SRC/openSUSE:Factory/.nginx.new.12324/nginx.changes   2021-04-22 
18:03:40.190479250 +0200
@@ -1,0 +2,16 @@
+Tue Apr 20 20:41:21 UTC 2021 - ???????? ???????????? <i...@ilya.pp.ua>
+
+- Update to 1.20.0
+  * 1.20.x stable branch.
+
+-------------------------------------------------------------------
+Wed Apr 14 11:09:07 UTC 2021 - ???????? ???????????? <i...@ilya.pp.ua>
+
+- Update to 1.19.10
+  * https://nginx.org/en/CHANGES
+  * Changed default value for "keepalive_requests" to 1000.
+  * Added "keepalive_time" directive and $connection_time variable.
+  * Fixed "gzip filter failed to use preallocated memory" alerts
+    appeared in logs when using zlib-ng.
+
+-------------------------------------------------------------------

Old:
----
  nginx-1.19.9.tar.gz
  nginx-1.19.9.tar.gz.asc

New:
----
  nginx-1.20.0.tar.gz
  nginx-1.20.0.tar.gz.asc

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ nginx.spec ++++++
--- /var/tmp/diff_new_pack.bDOkN0/_old  2021-04-22 18:03:40.834480245 +0200
+++ /var/tmp/diff_new_pack.bDOkN0/_new  2021-04-22 18:03:40.838480252 +0200
@@ -23,7 +23,7 @@
 %bcond_with    ngx_google_perftools
 #
 Name:           nginx
-Version:        1.19.9
+Version:        1.20.0
 Release:        0
 Summary:        A HTTP server and IMAP/POP3 proxy server
 License:        BSD-2-Clause

++++++ nginx-1.19.9.tar.gz -> nginx-1.20.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nginx-1.19.9/CHANGES new/nginx-1.20.0/CHANGES
--- old/nginx-1.19.9/CHANGES    2021-03-30 16:47:17.000000000 +0200
+++ new/nginx-1.20.0/CHANGES    2021-04-20 15:35:55.000000000 +0200
@@ -1,4 +1,22 @@
 
+Changes with nginx 1.20.0                                        20 Apr 2021
+
+    *) 1.20.x stable branch.
+
+
+Changes with nginx 1.19.10                                       13 Apr 2021
+
+    *) Change: the default value of the "keepalive_requests" directive was
+       changed to 1000.
+
+    *) Feature: the "keepalive_time" directive.
+
+    *) Feature: the $connection_time variable.
+
+    *) Workaround: "gzip filter failed to use preallocated memory" alerts
+       appeared in logs when using zlib-ng.
+
+
 Changes with nginx 1.19.9                                        30 Mar 2021
 
     *) Bugfix: nginx could not be built with the mail proxy module, but
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nginx-1.19.9/CHANGES.ru new/nginx-1.20.0/CHANGES.ru
--- old/nginx-1.19.9/CHANGES.ru 2021-03-30 16:47:15.000000000 +0200
+++ new/nginx-1.20.0/CHANGES.ru 2021-04-20 15:35:52.000000000 +0200
@@ -1,4 +1,22 @@
 
+?????????????????? ?? nginx 1.20.0                                          
20.04.2021
+
+    *) ???????????????????? ?????????? 1.20.x.
+
+
+?????????????????? ?? nginx 1.19.10                                         
13.04.2021
+
+    *) ??????????????????: ?? ?????????????????? keepalive_requests 
???????????????? ???? ??????????????????
+       ???????????????? ???? 1000.
+
+    *) ????????????????????: ?????????????????? keepalive_time.
+
+    *) ????????????????????: ???????????????????? $connection_time.
+
+    *) ??????????????????: ?????? ?????????????????????????? zlib-ng ?? 
?????????? ???????????????????? ??????????????????
+       "gzip filter failed to use preallocated memory".
+
+
 ?????????????????? ?? nginx 1.19.9                                          
30.03.2021
 
     *) ??????????????????????: nginx ???? ?????????????????? ?? 
???????????????? ????????????-????????????????, ???? ??????
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nginx-1.19.9/auto/os/linux 
new/nginx-1.20.0/auto/os/linux
--- old/nginx-1.19.9/auto/os/linux      2021-03-30 16:47:11.000000000 +0200
+++ new/nginx-1.20.0/auto/os/linux      2021-04-20 15:35:47.000000000 +0200
@@ -86,6 +86,31 @@
                       ee.data.ptr = NULL;
                       epoll_ctl(efd, EPOLL_CTL_ADD, fd, &ee)"
     . auto/feature
+
+
+    # eventfd()
+
+    ngx_feature="eventfd()"
+    ngx_feature_name="NGX_HAVE_EVENTFD"
+    ngx_feature_run=no
+    ngx_feature_incs="#include <sys/eventfd.h>"
+    ngx_feature_path=
+    ngx_feature_libs=
+    ngx_feature_test="(void) eventfd(0, 0)"
+    . auto/feature
+
+    if [ $ngx_found = yes ]; then
+        have=NGX_HAVE_SYS_EVENTFD_H . auto/have
+    fi
+
+
+    if [ $ngx_found = no ]; then
+
+        ngx_feature="eventfd() (SYS_eventfd)"
+        ngx_feature_incs="#include <sys/syscall.h>"
+        ngx_feature_test="(void) SYS_eventfd"
+        . auto/feature
+    fi
 fi
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nginx-1.19.9/auto/unix new/nginx-1.20.0/auto/unix
--- old/nginx-1.19.9/auto/unix  2021-03-30 16:47:11.000000000 +0200
+++ new/nginx-1.20.0/auto/unix  2021-04-20 15:35:47.000000000 +0200
@@ -582,29 +582,6 @@
 END
         exit 1
     fi
-
-else
-
-    ngx_feature="eventfd()"
-    ngx_feature_name="NGX_HAVE_EVENTFD"
-    ngx_feature_run=no
-    ngx_feature_incs="#include <sys/eventfd.h>"
-    ngx_feature_path=
-    ngx_feature_libs=
-    ngx_feature_test="(void) eventfd(0, 0)"
-    . auto/feature
-
-    if [ $ngx_found = yes ]; then
-        have=NGX_HAVE_SYS_EVENTFD_H . auto/have
-    fi
-
-    if [ $ngx_found = no ]; then
-
-        ngx_feature="eventfd() (SYS_eventfd)"
-        ngx_feature_incs="#include <sys/syscall.h>"
-        ngx_feature_test="(void) SYS_eventfd"
-        . auto/feature
-    fi
 fi
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nginx-1.19.9/src/core/nginx.h 
new/nginx-1.20.0/src/core/nginx.h
--- old/nginx-1.19.9/src/core/nginx.h   2021-03-30 16:47:11.000000000 +0200
+++ new/nginx-1.20.0/src/core/nginx.h   2021-04-20 15:35:47.000000000 +0200
@@ -9,8 +9,8 @@
 #define _NGINX_H_INCLUDED_
 
 
-#define nginx_version      1019009
-#define NGINX_VERSION      "1.19.9"
+#define nginx_version      1020000
+#define NGINX_VERSION      "1.20.0"
 #define NGINX_VER          "nginx/" NGINX_VERSION
 
 #ifdef NGX_BUILD
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nginx-1.19.9/src/core/ngx_connection.h 
new/nginx-1.20.0/src/core/ngx_connection.h
--- old/nginx-1.19.9/src/core/ngx_connection.h  2021-03-30 16:47:11.000000000 
+0200
+++ new/nginx-1.20.0/src/core/ngx_connection.h  2021-04-20 15:35:47.000000000 
+0200
@@ -162,6 +162,7 @@
 
     ngx_atomic_uint_t   number;
 
+    ngx_msec_t          start_time;
     ngx_uint_t          requests;
 
     unsigned            buffered:8;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nginx-1.19.9/src/core/ngx_resolver.c 
new/nginx-1.20.0/src/core/ngx_resolver.c
--- old/nginx-1.19.9/src/core/ngx_resolver.c    2021-03-30 16:47:11.000000000 
+0200
+++ new/nginx-1.20.0/src/core/ngx_resolver.c    2021-04-20 15:35:47.000000000 
+0200
@@ -4459,6 +4459,8 @@
 
     c->number = ngx_atomic_fetch_add(ngx_connection_counter, 1);
 
+    c->start_time = ngx_current_msec;
+
     ngx_log_debug3(NGX_LOG_DEBUG_EVENT, &rec->log, 0,
                    "connect to %V, fd:%d #%uA", &rec->server, s, c->number);
 
@@ -4545,6 +4547,8 @@
 
     c->number = ngx_atomic_fetch_add(ngx_connection_counter, 1);
 
+    c->start_time = ngx_current_msec;
+
     if (ngx_add_conn) {
         if (ngx_add_conn(c) == NGX_ERROR) {
             goto failed;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nginx-1.19.9/src/event/ngx_event_accept.c 
new/nginx-1.20.0/src/event/ngx_event_accept.c
--- old/nginx-1.19.9/src/event/ngx_event_accept.c       2021-03-30 
16:47:11.000000000 +0200
+++ new/nginx-1.20.0/src/event/ngx_event_accept.c       2021-04-20 
15:35:47.000000000 +0200
@@ -256,6 +256,8 @@
 
         c->number = ngx_atomic_fetch_add(ngx_connection_counter, 1);
 
+        c->start_time = ngx_current_msec;
+
 #if (NGX_STAT_STUB)
         (void) ngx_atomic_fetch_add(ngx_stat_handled, 1);
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nginx-1.19.9/src/event/ngx_event_connect.c 
new/nginx-1.20.0/src/event/ngx_event_connect.c
--- old/nginx-1.19.9/src/event/ngx_event_connect.c      2021-03-30 
16:47:11.000000000 +0200
+++ new/nginx-1.20.0/src/event/ngx_event_connect.c      2021-04-20 
15:35:47.000000000 +0200
@@ -193,6 +193,8 @@
 
     c->number = ngx_atomic_fetch_add(ngx_connection_counter, 1);
 
+    c->start_time = ngx_current_msec;
+
     if (ngx_add_conn) {
         if (ngx_add_conn(c) == NGX_ERROR) {
             goto failed;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nginx-1.19.9/src/event/ngx_event_udp.c 
new/nginx-1.20.0/src/event/ngx_event_udp.c
--- old/nginx-1.19.9/src/event/ngx_event_udp.c  2021-03-30 16:47:11.000000000 
+0200
+++ new/nginx-1.20.0/src/event/ngx_event_udp.c  2021-04-20 15:35:47.000000000 
+0200
@@ -363,6 +363,8 @@
 
         c->number = ngx_atomic_fetch_add(ngx_connection_counter, 1);
 
+        c->start_time = ngx_current_msec;
+
 #if (NGX_STAT_STUB)
         (void) ngx_atomic_fetch_add(ngx_stat_handled, 1);
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/nginx-1.19.9/src/http/modules/ngx_http_gzip_filter_module.c 
new/nginx-1.20.0/src/http/modules/ngx_http_gzip_filter_module.c
--- old/nginx-1.19.9/src/http/modules/ngx_http_gzip_filter_module.c     
2021-03-30 16:47:11.000000000 +0200
+++ new/nginx-1.20.0/src/http/modules/ngx_http_gzip_filter_module.c     
2021-04-20 15:35:47.000000000 +0200
@@ -56,7 +56,7 @@
     unsigned             done:1;
     unsigned             nomem:1;
     unsigned             buffering:1;
-    unsigned             intel:1;
+    unsigned             zlib_ng:1;
 
     size_t               zin;
     size_t               zout;
@@ -213,7 +213,7 @@
 static ngx_http_output_header_filter_pt  ngx_http_next_header_filter;
 static ngx_http_output_body_filter_pt    ngx_http_next_body_filter;
 
-static ngx_uint_t  ngx_http_gzip_assume_intel;
+static ngx_uint_t  ngx_http_gzip_assume_zlib_ng;
 
 
 static ngx_int_t
@@ -501,18 +501,21 @@
      * 8K is for zlib deflate_state, it takes
      *  *) 5816 bytes on i386 and sparc64 (32-bit mode)
      *  *) 5920 bytes on amd64 and sparc64
+     *
+     * A zlib variant from Intel (https://github.com/jtkukunas/zlib)
+     * uses additional 16-byte padding in one of window-sized buffers.
      */
 
-    if (!ngx_http_gzip_assume_intel) {
-        ctx->allocated = 8192 + (1 << (wbits + 2)) + (1 << (memlevel + 9));
+    if (!ngx_http_gzip_assume_zlib_ng) {
+        ctx->allocated = 8192 + 16 + (1 << (wbits + 2))
+                         + (1 << (memlevel + 9));
 
     } else {
         /*
-         * A zlib variant from Intel, https://github.com/jtkukunas/zlib.
-         * It can force window bits to 13 for fast compression level,
-         * on processors with SSE 4.2 it uses 64K hash instead of scaling
-         * it from the specified memory level, and also introduces
-         * 16-byte padding in one out of the two window-sized buffers.
+         * Another zlib variant, https://github.com/zlib-ng/zlib-ng.
+         * It forces window bits to 13 for fast compression level,
+         * uses 16-byte padding in one of window-sized buffers, and
+         * uses 128K hash.
          */
 
         if (conf->level == 1) {
@@ -520,9 +523,8 @@
         }
 
         ctx->allocated = 8192 + 16 + (1 << (wbits + 2))
-                         + (1 << (ngx_max(memlevel, 8) + 8))
-                         + (1 << (memlevel + 8));
-        ctx->intel = 1;
+                         + 131072 + (1 << (memlevel + 8));
+        ctx->zlib_ng = 1;
     }
 }
 
@@ -945,13 +947,13 @@
         return p;
     }
 
-    if (ctx->intel) {
+    if (ctx->zlib_ng) {
         ngx_log_error(NGX_LOG_ALERT, ctx->request->connection->log, 0,
                       "gzip filter failed to use preallocated memory: "
                       "%ud of %ui", items * size, ctx->allocated);
 
     } else {
-        ngx_http_gzip_assume_intel = 1;
+        ngx_http_gzip_assume_zlib_ng = 1;
     }
 
     p = ngx_palloc(ctx->request->pool, items * size);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/nginx-1.19.9/src/http/modules/ngx_http_upstream_keepalive_module.c 
new/nginx-1.20.0/src/http/modules/ngx_http_upstream_keepalive_module.c
--- old/nginx-1.19.9/src/http/modules/ngx_http_upstream_keepalive_module.c      
2021-03-30 16:47:11.000000000 +0200
+++ new/nginx-1.20.0/src/http/modules/ngx_http_upstream_keepalive_module.c      
2021-04-20 15:35:47.000000000 +0200
@@ -13,6 +13,7 @@
 typedef struct {
     ngx_uint_t                         max_cached;
     ngx_uint_t                         requests;
+    ngx_msec_t                         time;
     ngx_msec_t                         timeout;
 
     ngx_queue_t                        cache;
@@ -86,6 +87,13 @@
       0,
       NULL },
 
+    { ngx_string("keepalive_time"),
+      NGX_HTTP_UPS_CONF|NGX_CONF_TAKE1,
+      ngx_conf_set_msec_slot,
+      NGX_HTTP_SRV_CONF_OFFSET,
+      offsetof(ngx_http_upstream_keepalive_srv_conf_t, time),
+      NULL },
+
     { ngx_string("keepalive_timeout"),
       NGX_HTTP_UPS_CONF|NGX_CONF_TAKE1,
       ngx_conf_set_msec_slot,
@@ -149,8 +157,9 @@
     kcf = ngx_http_conf_upstream_srv_conf(us,
                                           ngx_http_upstream_keepalive_module);
 
+    ngx_conf_init_msec_value(kcf->time, 3600000);
     ngx_conf_init_msec_value(kcf->timeout, 60000);
-    ngx_conf_init_uint_value(kcf->requests, 100);
+    ngx_conf_init_uint_value(kcf->requests, 1000);
 
     if (kcf->original_init_upstream(cf, us) != NGX_OK) {
         return NGX_ERROR;
@@ -326,6 +335,10 @@
         goto invalid;
     }
 
+    if (ngx_current_msec - c->start_time > kp->conf->time) {
+        goto invalid;
+    }
+
     if (!u->keepalive) {
         goto invalid;
     }
@@ -513,6 +526,7 @@
      *     conf->max_cached = 0;
      */
 
+    conf->time = NGX_CONF_UNSET_MSEC;
     conf->timeout = NGX_CONF_UNSET_MSEC;
     conf->requests = NGX_CONF_UNSET_UINT;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nginx-1.19.9/src/http/ngx_http_core_module.c 
new/nginx-1.20.0/src/http/ngx_http_core_module.c
--- old/nginx-1.19.9/src/http/ngx_http_core_module.c    2021-03-30 
16:47:11.000000000 +0200
+++ new/nginx-1.20.0/src/http/ngx_http_core_module.c    2021-04-20 
15:35:47.000000000 +0200
@@ -495,6 +495,13 @@
       offsetof(ngx_http_core_loc_conf_t, limit_rate_after),
       NULL },
 
+    { ngx_string("keepalive_time"),
+      NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
+      ngx_conf_set_msec_slot,
+      NGX_HTTP_LOC_CONF_OFFSET,
+      offsetof(ngx_http_core_loc_conf_t, keepalive_time),
+      NULL },
+
     { ngx_string("keepalive_timeout"),
       NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE12,
       ngx_http_core_keepalive,
@@ -1335,6 +1342,11 @@
         } else if (r->connection->requests >= clcf->keepalive_requests) {
             r->keepalive = 0;
 
+        } else if (ngx_current_msec - r->connection->start_time
+                   > clcf->keepalive_time)
+        {
+            r->keepalive = 0;
+
         } else if (r->headers_in.msie6
                    && r->method == NGX_HTTP_POST
                    && (clcf->keepalive_disable
@@ -3500,6 +3512,7 @@
     clcf->send_timeout = NGX_CONF_UNSET_MSEC;
     clcf->send_lowat = NGX_CONF_UNSET_SIZE;
     clcf->postpone_output = NGX_CONF_UNSET_SIZE;
+    clcf->keepalive_time = NGX_CONF_UNSET_MSEC;
     clcf->keepalive_timeout = NGX_CONF_UNSET_MSEC;
     clcf->keepalive_header = NGX_CONF_UNSET;
     clcf->keepalive_requests = NGX_CONF_UNSET_UINT;
@@ -3738,12 +3751,14 @@
         conf->limit_rate_after = prev->limit_rate_after;
     }
 
+    ngx_conf_merge_msec_value(conf->keepalive_time,
+                              prev->keepalive_time, 3600000);
     ngx_conf_merge_msec_value(conf->keepalive_timeout,
                               prev->keepalive_timeout, 75000);
     ngx_conf_merge_sec_value(conf->keepalive_header,
                               prev->keepalive_header, 0);
     ngx_conf_merge_uint_value(conf->keepalive_requests,
-                              prev->keepalive_requests, 100);
+                              prev->keepalive_requests, 1000);
     ngx_conf_merge_uint_value(conf->lingering_close,
                               prev->lingering_close, NGX_HTTP_LINGERING_ON);
     ngx_conf_merge_msec_value(conf->lingering_time,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nginx-1.19.9/src/http/ngx_http_core_module.h 
new/nginx-1.20.0/src/http/ngx_http_core_module.h
--- old/nginx-1.19.9/src/http/ngx_http_core_module.h    2021-03-30 
16:47:11.000000000 +0200
+++ new/nginx-1.20.0/src/http/ngx_http_core_module.h    2021-04-20 
15:35:47.000000000 +0200
@@ -359,6 +359,7 @@
 
     ngx_msec_t    client_body_timeout;     /* client_body_timeout */
     ngx_msec_t    send_timeout;            /* send_timeout */
+    ngx_msec_t    keepalive_time;          /* keepalive_time */
     ngx_msec_t    keepalive_timeout;       /* keepalive_timeout */
     ngx_msec_t    lingering_time;          /* lingering_time */
     ngx_msec_t    lingering_timeout;       /* lingering_timeout */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nginx-1.19.9/src/http/ngx_http_variables.c 
new/nginx-1.20.0/src/http/ngx_http_variables.c
--- old/nginx-1.19.9/src/http/ngx_http_variables.c      2021-03-30 
16:47:11.000000000 +0200
+++ new/nginx-1.20.0/src/http/ngx_http_variables.c      2021-04-20 
15:35:47.000000000 +0200
@@ -129,6 +129,8 @@
     ngx_http_variable_value_t *v, uintptr_t data);
 static ngx_int_t ngx_http_variable_connection_requests(ngx_http_request_t *r,
     ngx_http_variable_value_t *v, uintptr_t data);
+static ngx_int_t ngx_http_variable_connection_time(ngx_http_request_t *r,
+    ngx_http_variable_value_t *v, uintptr_t data);
 
 static ngx_int_t ngx_http_variable_nginx_version(ngx_http_request_t *r,
     ngx_http_variable_value_t *v, uintptr_t data);
@@ -342,6 +344,9 @@
     { ngx_string("connection_requests"), NULL,
       ngx_http_variable_connection_requests, 0, 0, 0 },
 
+    { ngx_string("connection_time"), NULL, ngx_http_variable_connection_time,
+      0, NGX_HTTP_VAR_NOCACHEABLE, 0 },
+
     { ngx_string("nginx_version"), NULL, ngx_http_variable_nginx_version,
       0, 0, 0 },
 
@@ -2246,6 +2251,31 @@
     v->valid = 1;
     v->no_cacheable = 0;
     v->not_found = 0;
+    v->data = p;
+
+    return NGX_OK;
+}
+
+
+static ngx_int_t
+ngx_http_variable_connection_time(ngx_http_request_t *r,
+    ngx_http_variable_value_t *v, uintptr_t data)
+{
+    u_char          *p;
+    ngx_msec_int_t   ms;
+
+    p = ngx_pnalloc(r->pool, NGX_TIME_T_LEN + 4);
+    if (p == NULL) {
+        return NGX_ERROR;
+    }
+
+    ms = ngx_current_msec - r->connection->start_time;
+    ms = ngx_max(ms, 0);
+
+    v->len = ngx_sprintf(p, "%T.%03M", (time_t) ms / 1000, ms % 1000) - p;
+    v->valid = 1;
+    v->no_cacheable = 0;
+    v->not_found = 0;
     v->data = p;
 
     return NGX_OK;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nginx-1.19.9/src/http/v2/ngx_http_v2.c 
new/nginx-1.20.0/src/http/v2/ngx_http_v2.c
--- old/nginx-1.19.9/src/http/v2/ngx_http_v2.c  2021-03-30 16:47:11.000000000 
+0200
+++ new/nginx-1.20.0/src/http/v2/ngx_http_v2.c  2021-04-20 15:35:47.000000000 
+0200
@@ -277,7 +277,7 @@
     h2scf = ngx_http_get_module_srv_conf(hc->conf_ctx, ngx_http_v2_module);
 
     h2c->concurrent_pushes = h2scf->concurrent_pushes;
-    h2c->priority_limit = h2scf->concurrent_streams;
+    h2c->priority_limit = ngx_max(h2scf->concurrent_streams, 100);
 
     h2c->pool = ngx_create_pool(h2scf->pool_size, h2c->connection->log);
     if (h2c->pool == NULL) {
@@ -1369,7 +1369,9 @@
                                         ngx_http_core_module);
 
     if (clcf->keepalive_timeout == 0
-        || h2c->connection->requests >= clcf->keepalive_requests)
+        || h2c->connection->requests >= clcf->keepalive_requests
+        || ngx_current_msec - h2c->connection->start_time
+           > clcf->keepalive_time)
     {
         h2c->goaway = 1;
 

Reply via email to