Mercurial > hg > nginx
comparison src/http/ngx_http_request_body.c @ 1065:9039e845e532
fix segfault when a request body fits in r->header_in and
the body will be written to file
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 19 Jan 2007 16:13:15 +0000 |
parents | bb139aba3199 |
children | f303d33f3927 |
comparison
equal
deleted
inserted
replaced
1064:7c84c877f2d7 | 1065:9039e845e532 |
---|---|
160 rb->rest = r->headers_in.content_length_n - preread; | 160 rb->rest = r->headers_in.content_length_n - preread; |
161 | 161 |
162 if (rb->rest <= (off_t) (b->end - b->last)) { | 162 if (rb->rest <= (off_t) (b->end - b->last)) { |
163 | 163 |
164 /* the whole request body may be placed in r->header_in */ | 164 /* the whole request body may be placed in r->header_in */ |
165 | |
166 rb->to_write = rb->bufs; | |
165 | 167 |
166 r->read_event_handler = ngx_http_read_client_request_body_handler; | 168 r->read_event_handler = ngx_http_read_client_request_body_handler; |
167 | 169 |
168 return ngx_http_do_read_client_request_body(r); | 170 return ngx_http_do_read_client_request_body(r); |
169 } | 171 } |