comparison src/http/v3/ngx_http_v3_request.c @ 8904:d2c193aa8480 quic

HTTP/3: send Stream Cancellation instruction. As per quic-qpack-21: When a stream is reset or reading is abandoned, the decoder emits a Stream Cancellation instruction. Previously the instruction was not sent. Now it's sent when closing QUIC stream connection if dynamic table capacity is non-zero and eof was not received from client. The latter condition means that a trailers section may still be on its way from client and the stream needs to be cancelled.
author Roman Arutyunyan <arut@nginx.com>
date Mon, 18 Oct 2021 14:48:11 +0300
parents 0d3bf08eaac0
children 33226ac61076
comparison
equal deleted inserted replaced
8903:0d3bf08eaac0 8904:d2c193aa8480
277 277
278 278
279 void 279 void
280 ngx_http_v3_reset_connection(ngx_connection_t *c) 280 ngx_http_v3_reset_connection(ngx_connection_t *c)
281 { 281 {
282 ngx_http_v3_srv_conf_t *h3scf;
283
284 h3scf = ngx_http_v3_get_module_srv_conf(c, ngx_http_v3_module);
285
286 if (h3scf->max_table_capacity > 0 && !c->read->eof) {
287 (void) ngx_http_v3_send_cancel_stream(c, c->quic->id);
288 }
289
282 if (c->timedout) { 290 if (c->timedout) {
283 ngx_quic_reset_stream(c, NGX_HTTP_V3_ERR_GENERAL_PROTOCOL_ERROR); 291 ngx_quic_reset_stream(c, NGX_HTTP_V3_ERR_GENERAL_PROTOCOL_ERROR);
284 292
285 } else if (c->close) { 293 } else if (c->close) {
286 ngx_quic_reset_stream(c, NGX_HTTP_V3_ERR_REQUEST_REJECTED); 294 ngx_quic_reset_stream(c, NGX_HTTP_V3_ERR_REQUEST_REJECTED);