From b8be9ddfa77fc320f490f6c949a501e6cff896c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?agentzh=20=28=E7=AB=A0=E4=BA=A6=E6=98=A5=29?= Date: Fri, 21 Oct 2011 21:55:17 +0800 Subject: [PATCH] updated patches/nginx-1.0.8-allow_request_body_updating.patch to fix the case when calling ngx_http_read_client_request_body after ngx_http_discard_request_body is called. --- patches/nginx-1.0.8-allow_request_body_updating.patch | 11 ++++++++++- util/configure | 1 - 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/patches/nginx-1.0.8-allow_request_body_updating.patch b/patches/nginx-1.0.8-allow_request_body_updating.patch index 38879ef1d..0e4f2d585 100644 --- a/patches/nginx-1.0.8-allow_request_body_updating.patch +++ b/patches/nginx-1.0.8-allow_request_body_updating.patch @@ -1,6 +1,15 @@ diff -ur nginx-1.0.8/src/http/ngx_http_request_body.c nginx-1.0.8-patched/src/http/ngx_http_request_body.c --- nginx-1.0.8/src/http/ngx_http_request_body.c 2011-09-30 22:36:19.000000000 +0800 -+++ nginx-1.0.8-patched/src/http/ngx_http_request_body.c 2011-10-21 19:05:53.954380165 +0800 ++++ nginx-1.0.8-patched/src/http/ngx_http_request_body.c 2011-10-21 21:54:08.460350482 +0800 +@@ -38,7 +38,7 @@ + + r->main->count++; + +- if (r->request_body || r->discard_body) { ++ if (r->request_body || r->discard_body || r->content_length_n == 0) { + post_handler(r); + return NGX_OK; + } @@ -440,7 +440,7 @@ ssize_t size; ngx_event_t *rev; diff --git a/util/configure b/util/configure index 43daf90b6..9c450bf64 100755 --- a/util/configure +++ b/util/configure @@ -581,7 +581,6 @@ _END_ ngx_lua_dquote='"' CFLAGS="\$CFLAGS -DLUA_DEFAULT_PATH='\$ngx_lua_dquote$lualib_prefix/?.lua\$ngx_lua_dquote'" CFLAGS="\$CFLAGS -DLUA_DEFAULT_CPATH='\$ngx_lua_dquote$lualib_prefix/?.so\$ngx_lua_dquote'" -CFLAGS="\$CFLAGS -DNGINX_ALLOW_REQUEST_BODY_UPDATING" _EOC_ close $in;