diff src/http/ngx_http_request_body.c @ 3214:798a7f1d3b2f

restore discard body handler after ngx_http_set_writer() set it to ngx_http_test_reading(), the bug was introduced in r3050
author Igor Sysoev <igor@sysoev.ru>
date Mon, 19 Oct 2009 16:12:13 +0000
parents 7fc06314c684
children e56c1e9873cb 795761886688
line wrap: on
line diff
--- a/src/http/ngx_http_request_body.c
+++ b/src/http/ngx_http_request_body.c
@@ -13,7 +13,6 @@ static void ngx_http_read_client_request
 static ngx_int_t ngx_http_do_read_client_request_body(ngx_http_request_t *r);
 static ngx_int_t ngx_http_write_request_body(ngx_http_request_t *r,
     ngx_chain_t *body);
-static void ngx_http_read_discarded_request_body_handler(ngx_http_request_t *r);
 static ngx_int_t ngx_http_read_discarded_request_body(ngx_http_request_t *r);
 static ngx_int_t ngx_http_test_expect(ngx_http_request_t *r);
 
@@ -470,7 +469,7 @@ ngx_http_discard_request_body(ngx_http_r
         }
     }
 
-    r->read_event_handler = ngx_http_read_discarded_request_body_handler;
+    r->read_event_handler = ngx_http_discarded_request_body_handler;
 
     if (ngx_handle_read_event(rev, 0) != NGX_OK) {
         return NGX_HTTP_INTERNAL_SERVER_ERROR;
@@ -488,8 +487,8 @@ ngx_http_discard_request_body(ngx_http_r
 }
 
 
-static void
-ngx_http_read_discarded_request_body_handler(ngx_http_request_t *r)
+void
+ngx_http_discarded_request_body_handler(ngx_http_request_t *r)
 {
     ngx_int_t                  rc;
     ngx_msec_t                 timer;