aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_special_response.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2008-12-26 13:43:42 +0000
committerIgor Sysoev <igor@sysoev.ru>2008-12-26 13:43:42 +0000
commit303df47fcbbbbb9d2bc823b0bdae54682db358a9 (patch)
treed894814dd97027bbd221ce15d4270012914c3407 /src/http/ngx_http_special_response.c
parent2aae701ab7f9c5a95d9fabcfa3e8f6f4e16e7713 (diff)
downloadnginx-303df47fcbbbbb9d2bc823b0bdae54682db358a9.tar.gz
nginx-303df47fcbbbbb9d2bc823b0bdae54682db358a9.zip
send "100 Continue" just before reading request body
Diffstat (limited to 'src/http/ngx_http_special_response.c')
-rw-r--r--src/http/ngx_http_special_response.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c
index 849326839..50d804307 100644
--- a/src/http/ngx_http_special_response.c
+++ b/src/http/ngx_http_special_response.c
@@ -379,6 +379,8 @@ ngx_http_special_response_handler(ngx_http_request_t *r, ngx_int_t error)
}
}
+ r->expect_tested = 1;
+
if (ngx_http_discard_request_body(r) != NGX_OK) {
error = NGX_HTTP_INTERNAL_SERVER_ERROR;
}
@@ -431,11 +433,18 @@ static ngx_int_t
ngx_http_send_error_page(ngx_http_request_t *r, ngx_http_err_page_t *err_page)
{
u_char ch, *p, *last;
+ ngx_int_t overwrite;
ngx_str_t *uri, *args, u, a;
ngx_table_elt_t *location;
ngx_http_core_loc_conf_t *clcf;
- r->err_status = err_page->overwrite;
+ overwrite = err_page->overwrite;
+
+ if (overwrite && overwrite != NGX_HTTP_OK) {
+ r->expect_tested = 1;
+ }
+
+ r->err_status = overwrite;
r->zero_in_uri = 0;