aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2007-01-19 12:57:02 +0000
committerIgor Sysoev <igor@sysoev.ru>2007-01-19 12:57:02 +0000
commit8ff1e3251c689d714e98d8487ec917b4ed771879 (patch)
treed93700e16ace0279b5be1c0e247773f2156f3d5f /src
parentae2006b2fe27e09a73e2b7d42cc696f74ff96862 (diff)
downloadnginx-8ff1e3251c689d714e98d8487ec917b4ed771879.tar.gz
nginx-8ff1e3251c689d714e98d8487ec917b4ed771879.zip
fix segfault when client_body_in_file_only is on, the body is not passed
to upstream, and nginx tries next upstream
Diffstat (limited to 'src')
-rw-r--r--src/http/ngx_http_upstream.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
index 780528a33..d5e6dd5e6 100644
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -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