Mercurial > hg > nginx
comparison src/http/ngx_http_variables.c @ 6050:a08fad30aeac
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.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 23 Mar 2015 21:09:19 +0300 |
parents | 6c99c5f00fc9 |
children | 48c13a0824c5 |
comparison
equal
deleted
inserted
replaced
6049:42d9beeb22db | 6050:a08fad30aeac |
---|---|
1079 v->data = r->headers_in.content_length->value.data; | 1079 v->data = r->headers_in.content_length->value.data; |
1080 v->valid = 1; | 1080 v->valid = 1; |
1081 v->no_cacheable = 0; | 1081 v->no_cacheable = 0; |
1082 v->not_found = 0; | 1082 v->not_found = 0; |
1083 | 1083 |
1084 } else if (r->reading_body) { | |
1085 v->not_found = 1; | |
1086 v->no_cacheable = 1; | |
1087 | |
1084 } else if (r->headers_in.content_length_n >= 0) { | 1088 } else if (r->headers_in.content_length_n >= 0) { |
1085 p = ngx_pnalloc(r->pool, NGX_OFF_T_LEN); | 1089 p = ngx_pnalloc(r->pool, NGX_OFF_T_LEN); |
1086 if (p == NULL) { | 1090 if (p == NULL) { |
1087 return NGX_ERROR; | 1091 return NGX_ERROR; |
1088 } | 1092 } |