]> git.kaiwu.me - nginx.git/commitdiff
fix segfault when client_body_in_file_only is on, the body is not passed
authorIgor Sysoev <igor@sysoev.ru>
Fri, 19 Jan 2007 12:57:02 +0000 (12:57 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Fri, 19 Jan 2007 12:57:02 +0000 (12:57 +0000)
to upstream, and nginx tries next upstream

src/http/ngx_http_upstream.c

index 780528a33c2200ffc3da2129ce2f6b7a1477a829..d5e6dd5e653fa39fb785e58f32da48667e1c082f 100644 (file)
@@ -569,8 +569,11 @@ ngx_http_upstream_connect(ngx_http_request_t *r, ngx_http_upstream_t *u)
         }
     }
 
-    if (r->request_body && r->request_body->temp_file && r == r->main) {
-
+    if (r->request_body
+        && r->request_body->buf
+        && r->request_body->temp_file
+        && r == r->main)
+    {
         /*
          * the r->request_body->buf can be reused for one request only,
          * the subrequests should allocate their own temporay bufs