Mercurial > hg > nginx
comparison src/http/v3/ngx_http_v3_streams.c @ 8719: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 | e1eb7f4ca9f1 |
children | 265062a99043 |
comparison
equal
deleted
inserted
replaced
8718:554e11a325a9 | 8719:5cb5b568282b |
---|---|
60 return NGX_ERROR; | 60 return NGX_ERROR; |
61 } | 61 } |
62 | 62 |
63 h3c->hc = *phc; | 63 h3c->hc = *phc; |
64 h3c->hc.http3 = 1; | 64 h3c->hc.http3 = 1; |
65 h3c->max_push_id = (uint64_t) -1; | |
65 | 66 |
66 ngx_queue_init(&h3c->blocked); | 67 ngx_queue_init(&h3c->blocked); |
67 ngx_queue_init(&h3c->pushing); | 68 ngx_queue_init(&h3c->pushing); |
68 | 69 |
69 pc->data = h3c; | 70 pc->data = h3c; |
760 h3c = c->quic->parent->data; | 761 h3c = c->quic->parent->data; |
761 | 762 |
762 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0, | 763 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0, |
763 "http3 MAX_PUSH_ID:%uL", max_push_id); | 764 "http3 MAX_PUSH_ID:%uL", max_push_id); |
764 | 765 |
765 if (max_push_id < h3c->max_push_id) { | 766 if (h3c->max_push_id != (uint64_t) -1 && max_push_id < h3c->max_push_id) { |
766 return NGX_HTTP_V3_ERR_ID_ERROR; | 767 return NGX_HTTP_V3_ERR_ID_ERROR; |
767 } | 768 } |
768 | 769 |
769 h3c->max_push_id = max_push_id; | 770 h3c->max_push_id = max_push_id; |
770 | 771 |