Mercurial > hg > nginx
changeset 3662:a870639d2970
Fix processing
error_page 502 504 /zero;
location = /zero { return 204; }
The bug has been introduced in r3634.
The fix also allow to use:
error_page 502 504 = /zero;
location = /zero { return 200; }
This case still does not work:
error_page 502 504 /zero;
location = /zero { return 200; }
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 30 Jun 2010 14:39:28 +0000 |
parents | 8649a0c0f09d |
children | 4a643a230686 |
files | src/http/ngx_http_core_module.c src/http/ngx_http_header_filter_module.c |
diffstat | 2 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.c Wed Jun 30 14:30:55 2010 +0000 +++ b/src/http/ngx_http_core_module.c Wed Jun 30 14:39:28 2010 +0000 @@ -1748,6 +1748,7 @@ r->headers_out.status = status; if (status == NGX_HTTP_NO_CONTENT) { + r->header_only = 1; return ngx_http_send_header(r); }
--- a/src/http/ngx_http_header_filter_module.c Wed Jun 30 14:30:55 2010 +0000 +++ b/src/http/ngx_http_header_filter_module.c Wed Jun 30 14:39:28 2010 +0000 @@ -170,6 +170,10 @@ #endif u_char addr[NGX_SOCKADDR_STRLEN]; + if (r->header_sent) { + return NGX_OK; + } + r->header_sent = 1; if (r != r->main) {