summaryrefslogtreecommitdiffhomepage
path: root/src/http/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/modules')
-rw-r--r--src/http/modules/ngx_http_scgi_module.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/http/modules/ngx_http_scgi_module.c b/src/http/modules/ngx_http_scgi_module.c
index 91f5f7ccd..8937464b6 100644
--- a/src/http/modules/ngx_http_scgi_module.c
+++ b/src/http/modules/ngx_http_scgi_module.c
@@ -658,11 +658,9 @@ ngx_http_scgi_create_request(ngx_http_request_t *r)
u_char buffer[NGX_OFF_T_LEN];
content_length_n = 0;
- body = r->upstream->request_bufs;
- while (body) {
- content_length_n += ngx_buf_size(body->buf);
- body = body->next;
+ if (r->headers_in.content_length_n > 0) {
+ content_length_n = r->headers_in.content_length_n;
}
content_length.data = buffer;