Mercurial > hg > nginx
comparison src/http/v3/ngx_http_v3_request.c @ 8292:46e3542d51b3 quic
Chunked response body in HTTP/3.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Fri, 27 Mar 2020 19:46:54 +0300 |
parents | 4feae8bc0ca9 |
children | 5649079a41f4 |
comparison
equal
deleted
inserted
replaced
8291:4feae8bc0ca9 | 8292:46e3542d51b3 |
---|---|
256 | 256 |
257 c = r->connection; | 257 c = r->connection; |
258 | 258 |
259 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "http3 create header"); | 259 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "http3 create header"); |
260 | 260 |
261 /* XXX support chunked body in the chunked filter */ | |
262 if (!r->header_only && r->headers_out.content_length_n == -1) { | |
263 return NULL; | |
264 } | |
265 | |
266 len = 2; | 261 len = 2; |
267 | 262 |
268 if (r->headers_out.status == NGX_HTTP_OK) { | 263 if (r->headers_out.status == NGX_HTTP_OK) { |
269 len += ngx_http_v3_encode_prefix_int(NULL, 25, 6); | 264 len += ngx_http_v3_encode_prefix_int(NULL, 25, 6); |
270 | 265 |
576 cl->next = bl; | 571 cl->next = bl; |
577 } | 572 } |
578 | 573 |
579 return hl; | 574 return hl; |
580 } | 575 } |
576 | |
577 | |
578 ngx_chain_t * | |
579 ngx_http_v3_create_trailers(ngx_http_request_t *r) | |
580 { | |
581 ngx_buf_t *b; | |
582 ngx_chain_t *cl; | |
583 | |
584 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, | |
585 "http3 create trailers"); | |
586 | |
587 /* XXX */ | |
588 | |
589 b = ngx_calloc_buf(r->pool); | |
590 if (b == NULL) { | |
591 return NULL; | |
592 } | |
593 | |
594 b->last_buf = 1; | |
595 | |
596 cl = ngx_alloc_chain_link(r->pool); | |
597 if (cl == NULL) { | |
598 return NULL; | |
599 } | |
600 | |
601 cl->buf = b; | |
602 cl->next = NULL; | |
603 | |
604 return cl; | |
605 } |