aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_variables.c
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2015-03-23 21:09:19 +0300
committerMaxim Dounin <mdounin@mdounin.ru>2015-03-23 21:09:19 +0300
commit2743bb68ee2e012a45d5084ccfea43b8bcb82eda (patch)
treeff34977446ff5ede088c3321136be352855fd102 /src/http/ngx_http_variables.c
parentd02d2cff9b26e87340e57b70dd534dbadd3ff876 (diff)
downloadnginx-2743bb68ee2e012a45d5084ccfea43b8bcb82eda.tar.gz
nginx-2743bb68ee2e012a45d5084ccfea43b8bcb82eda.zip
Request body: unbuffered reading.
The r->request_body_no_buffering flag was introduced. It instructs client request body reading code to avoid reading the whole body, and to call post_handler early instead. The caller should use the ngx_http_read_unbuffered_request_body() function to read remaining parts of the body. Upstream module is now able to use this mode, if configured with the proxy_request_buffering directive.
Diffstat (limited to 'src/http/ngx_http_variables.c')
-rw-r--r--src/http/ngx_http_variables.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/http/ngx_http_variables.c b/src/http/ngx_http_variables.c
index 738f2237a..c65de358e 100644
--- a/src/http/ngx_http_variables.c
+++ b/src/http/ngx_http_variables.c
@@ -1081,6 +1081,10 @@ ngx_http_variable_content_length(ngx_http_request_t *r,
v->no_cacheable = 0;
v->not_found = 0;
+ } else if (r->reading_body) {
+ v->not_found = 1;
+ v->no_cacheable = 1;
+
} else if (r->headers_in.content_length_n >= 0) {
p = ngx_pnalloc(r->pool, NGX_OFF_T_LEN);
if (p == NULL) {