fix segfault when client_body_in_file_only is on, the body is not passed

to upstream, and nginx tries next upstream
This commit is contained in:
Igor Sysoev 2007-01-19 12:57:02 +00:00
parent ae2006b2fe
commit 8ff1e3251c

View 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