diff src/http/v3/ngx_http_v3_filter_module.c @ 8354:5cb5b568282b quic

HTTP/3: do not push until a MAX_PUSH_ID frame is received. Fixes interop with quic-go that doesn't send MAX_PUSH_ID.
author Sergey Kandaurov <pluknet@nginx.com>
date Tue, 16 Mar 2021 13:48:29 +0300
parents 6bb924b00e30
children 40d710a66aef
line wrap: on
line diff
--- a/src/http/v3/ngx_http_v3_filter_module.c
+++ b/src/http/v3/ngx_http_v3_filter_module.c
@@ -787,7 +787,7 @@ ngx_http_v3_push_resource(ngx_http_reque
     h3scf = ngx_http_get_module_srv_conf(r, ngx_http_v3_module);
 
     ngx_log_debug5(NGX_LOG_DEBUG_HTTP, c->log, 0,
-                   "http3 push \"%V\" pushing:%ui/%ui id:%uL/%uL",
+                   "http3 push \"%V\" pushing:%ui/%ui id:%uL/%L",
                    path, h3c->npushing, h3scf->max_concurrent_pushes,
                    h3c->next_push_id, h3c->max_push_id);
 
@@ -797,7 +797,9 @@ ngx_http_v3_push_resource(ngx_http_reque
         return NGX_DECLINED;
     }
 
-    if (h3c->next_push_id > h3c->max_push_id) {
+    if (h3c->max_push_id == (uint64_t) -1
+        || h3c->next_push_id > h3c->max_push_id)
+    {
         ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0,
                        "http3 abort pushes due to max_push_id");
         return NGX_ABORT;