summaryrefslogtreecommitdiffhomepage
path: root/src/http/v3/ngx_http_v3_streams.c
diff options
context:
space:
mode:
authorSergey Kandaurov <pluknet@nginx.com>2021-03-16 13:48:29 +0300
committerSergey Kandaurov <pluknet@nginx.com>2021-03-16 13:48:29 +0300
commite522bb69f9e4fa480dfe875a559445ec7831cec9 (patch)
tree77fd42172521e757a54b77911f4d6536f66880bf /src/http/v3/ngx_http_v3_streams.c
parent780de6de44b066a253a455a061efb09ff8060d09 (diff)
downloadnginx-e522bb69f9e4fa480dfe875a559445ec7831cec9.tar.gz
nginx-e522bb69f9e4fa480dfe875a559445ec7831cec9.tar.bz2
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.
Diffstat (limited to 'src/http/v3/ngx_http_v3_streams.c')
-rw-r--r--src/http/v3/ngx_http_v3_streams.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/http/v3/ngx_http_v3_streams.c b/src/http/v3/ngx_http_v3_streams.c
index 871914065..c27fa16dc 100644
--- a/src/http/v3/ngx_http_v3_streams.c
+++ b/src/http/v3/ngx_http_v3_streams.c
@@ -62,6 +62,7 @@ ngx_http_v3_init_session(ngx_connection_t *c)
h3c->hc = *phc;
h3c->hc.http3 = 1;
+ h3c->max_push_id = (uint64_t) -1;
ngx_queue_init(&h3c->blocked);
ngx_queue_init(&h3c->pushing);
@@ -762,7 +763,7 @@ ngx_http_v3_set_max_push_id(ngx_connection_t *c, uint64_t max_push_id)
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0,
"http3 MAX_PUSH_ID:%uL", max_push_id);
- if (max_push_id < h3c->max_push_id) {
+ if (h3c->max_push_id != (uint64_t) -1 && max_push_id < h3c->max_push_id) {
return NGX_HTTP_V3_ERR_ID_ERROR;
}