Skip to content

Commit

Permalink
updated patches/nginx-1.0.8-allow_request_body_updating.patch to fix …
Browse files Browse the repository at this point in the history
…the case when calling ngx_http_read_client_request_body after ngx_http_discard_request_body is called.
  • Loading branch information
agentzh committed Oct 21, 2011
1 parent b0cfa8d commit b8be9dd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
11 changes: 10 additions & 1 deletion 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;
Expand Down
1 change: 0 additions & 1 deletion util/configure
Expand Up @@ -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;
Expand Down

0 comments on commit b8be9dd

Please sign in to comment.