aboutsummaryrefslogtreecommitdiff
path: root/src/http/v3/ngx_http_v3_request.c
diff options
context:
space:
mode:
authorRoman Arutyunyan <arut@nginx.com>2020-03-27 19:46:54 +0300
committerRoman Arutyunyan <arut@nginx.com>2020-03-27 19:46:54 +0300
commit80a38580bd04f499d72ab3b6f7776e275e47a2b3 (patch)
treee73bebd6af56f3ca689ce6fd0d607ed74f6b4a76 /src/http/v3/ngx_http_v3_request.c
parent81f7cff632d7db267be42f5451c6e1f29d021685 (diff)
downloadnginx-80a38580bd04f499d72ab3b6f7776e275e47a2b3.tar.gz
nginx-80a38580bd04f499d72ab3b6f7776e275e47a2b3.zip
Chunked response body in HTTP/3.
Diffstat (limited to 'src/http/v3/ngx_http_v3_request.c')
-rw-r--r--src/http/v3/ngx_http_v3_request.c35
1 files changed, 30 insertions, 5 deletions
diff --git a/src/http/v3/ngx_http_v3_request.c b/src/http/v3/ngx_http_v3_request.c
index b00b93ce2..756a6f90d 100644
--- a/src/http/v3/ngx_http_v3_request.c
+++ b/src/http/v3/ngx_http_v3_request.c
@@ -258,11 +258,6 @@ ngx_http_v3_create_header(ngx_http_request_t *r)
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "http3 create header");
- /* XXX support chunked body in the chunked filter */
- if (!r->header_only && r->headers_out.content_length_n == -1) {
- return NULL;
- }
-
len = 2;
if (r->headers_out.status == NGX_HTTP_OK) {
@@ -578,3 +573,33 @@ ngx_http_v3_create_header(ngx_http_request_t *r)
return hl;
}
+
+
+ngx_chain_t *
+ngx_http_v3_create_trailers(ngx_http_request_t *r)
+{
+ ngx_buf_t *b;
+ ngx_chain_t *cl;
+
+ ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
+ "http3 create trailers");
+
+ /* XXX */
+
+ b = ngx_calloc_buf(r->pool);
+ if (b == NULL) {
+ return NULL;
+ }
+
+ b->last_buf = 1;
+
+ cl = ngx_alloc_chain_link(r->pool);
+ if (cl == NULL) {
+ return NULL;
+ }
+
+ cl->buf = b;
+ cl->next = NULL;
+
+ return cl;
+}