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 8cff9c0e4c
commit 64fb74b910

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 r->request_body->buf can be reused for one request only,
* the subrequests should allocate their own temporay bufs * the subrequests should allocate their own temporay bufs