diff options
author | Roman Arutyunyan <arut@nginx.com> | 2023-05-19 21:46:36 +0400 |
---|---|---|
committer | Roman Arutyunyan <arut@nginx.com> | 2023-05-19 21:46:36 +0400 |
commit | 4b0266174814e6cf60a275321121dbaab084ee64 (patch) | |
tree | 1c47a0b456cb1bb6d6dd08aa2d94342d738b56c6 /src/http/ngx_http_request_body.c | |
parent | 1a8ef991d92d22eb8aded7f49595dd31a639e8a4 (diff) | |
parent | 94941bd840ce7b011a36f7fe33f3fc7f4c600688 (diff) | |
download | nginx-4b0266174814e6cf60a275321121dbaab084ee64.tar.gz nginx-4b0266174814e6cf60a275321121dbaab084ee64.zip |
Merged with the quic branch.
Diffstat (limited to 'src/http/ngx_http_request_body.c')
-rw-r--r-- | src/http/ngx_http_request_body.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/http/ngx_http_request_body.c b/src/http/ngx_http_request_body.c index ad3549f98..afb042395 100644 --- a/src/http/ngx_http_request_body.c +++ b/src/http/ngx_http_request_body.c @@ -92,6 +92,13 @@ ngx_http_read_client_request_body(ngx_http_request_t *r, } #endif +#if (NGX_HTTP_V3) + if (r->http_version == NGX_HTTP_VERSION_30) { + rc = ngx_http_v3_read_request_body(r); + goto done; + } +#endif + preread = r->header_in->last - r->header_in->pos; if (preread) { @@ -238,6 +245,18 @@ ngx_http_read_unbuffered_request_body(ngx_http_request_t *r) } #endif +#if (NGX_HTTP_V3) + if (r->http_version == NGX_HTTP_VERSION_30) { + rc = ngx_http_v3_read_unbuffered_request_body(r); + + if (rc == NGX_OK) { + r->reading_body = 0; + } + + return rc; + } +#endif + if (r->connection->read->timedout) { r->connection->timedout = 1; return NGX_HTTP_REQUEST_TIME_OUT; @@ -625,6 +644,12 @@ ngx_http_discard_request_body(ngx_http_request_t *r) } #endif +#if (NGX_HTTP_V3) + if (r->http_version == NGX_HTTP_VERSION_30) { + return NGX_OK; + } +#endif + if (ngx_http_test_expect(r) != NGX_OK) { return NGX_HTTP_INTERNAL_SERVER_ERROR; } @@ -921,6 +946,9 @@ ngx_http_test_expect(ngx_http_request_t *r) #if (NGX_HTTP_V2) || r->stream != NULL #endif +#if (NGX_HTTP_V3) + || r->connection->quic != NULL +#endif ) { return NGX_OK; |