Mercurial > hg > nginx-quic
comparison 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 |
comparison
equal
deleted
inserted
replaced
8353:554e11a325a9 | 8354:5cb5b568282b |
---|---|
785 c = r->connection; | 785 c = r->connection; |
786 h3c = c->quic->parent->data; | 786 h3c = c->quic->parent->data; |
787 h3scf = ngx_http_get_module_srv_conf(r, ngx_http_v3_module); | 787 h3scf = ngx_http_get_module_srv_conf(r, ngx_http_v3_module); |
788 | 788 |
789 ngx_log_debug5(NGX_LOG_DEBUG_HTTP, c->log, 0, | 789 ngx_log_debug5(NGX_LOG_DEBUG_HTTP, c->log, 0, |
790 "http3 push \"%V\" pushing:%ui/%ui id:%uL/%uL", | 790 "http3 push \"%V\" pushing:%ui/%ui id:%uL/%L", |
791 path, h3c->npushing, h3scf->max_concurrent_pushes, | 791 path, h3c->npushing, h3scf->max_concurrent_pushes, |
792 h3c->next_push_id, h3c->max_push_id); | 792 h3c->next_push_id, h3c->max_push_id); |
793 | 793 |
794 if (!ngx_path_separator(path->data[0])) { | 794 if (!ngx_path_separator(path->data[0])) { |
795 ngx_log_error(NGX_LOG_WARN, c->log, 0, | 795 ngx_log_error(NGX_LOG_WARN, c->log, 0, |
796 "non-absolute path \"%V\" not pushed", path); | 796 "non-absolute path \"%V\" not pushed", path); |
797 return NGX_DECLINED; | 797 return NGX_DECLINED; |
798 } | 798 } |
799 | 799 |
800 if (h3c->next_push_id > h3c->max_push_id) { | 800 if (h3c->max_push_id == (uint64_t) -1 |
801 || h3c->next_push_id > h3c->max_push_id) | |
802 { | |
801 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, | 803 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, |
802 "http3 abort pushes due to max_push_id"); | 804 "http3 abort pushes due to max_push_id"); |
803 return NGX_ABORT; | 805 return NGX_ABORT; |
804 } | 806 } |
805 | 807 |