From 07e9326673a7ceb48682156689a04c336ee71477 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Fri, 19 Jan 2007 16:13:15 +0000 Subject: [PATCH] fix segfault when a request body fits in r->header_in and the body will be written to file --- src/http/ngx_http_request_body.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/http/ngx_http_request_body.c b/src/http/ngx_http_request_body.c index f5f827511..11f82dbd4 100644 --- a/src/http/ngx_http_request_body.c +++ b/src/http/ngx_http_request_body.c @@ -163,6 +163,8 @@ ngx_http_read_client_request_body(ngx_http_request_t *r, /* the whole request body may be placed in r->header_in */ + rb->to_write = rb->bufs; + r->read_event_handler = ngx_http_read_client_request_body_handler; return ngx_http_do_read_client_request_body(r);