diff options
author | Igor Sysoev <igor@sysoev.ru> | 2005-05-14 18:42:03 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2005-05-14 18:42:03 +0000 |
commit | 3362b8df048ad32b6dd286b37e792f661bb894ea (patch) | |
tree | 4d34588122fdddf2213a44afac03f9100228990d /src/http/ngx_http_special_response.c | |
parent | a599375d3b5ae261d30d292a5eb7939623f6e4b1 (diff) | |
download | nginx-release-0.1.30.tar.gz nginx-release-0.1.30.zip |
nginx-0.1.30-RELEASE importrelease-0.1.30
*) Bugfix: the worker process may got caught in an endless loop if the
SSI was used.
*) Bugfix: the response encrypted by SSL may not transferred complete.
*) Bugfix: if the length of the response part received at once from
proxied or FastCGI server was equal to 500, then nginx returns the
500 response code; in proxy mode the the bug had appeared in 0.1.29
only.
*) Bugfix: nginx did not consider the directives with 8 or 9 parameters
as invalid.
*) Feature: the "return" directive can return the 204 response code.
*) Feature: the "ignore_invalid_headers" directive.
Diffstat (limited to 'src/http/ngx_http_special_response.c')
-rw-r--r-- | src/http/ngx_http_special_response.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c index 536068b03..5591dbc88 100644 --- a/src/http/ngx_http_special_response.c +++ b/src/http/ngx_http_special_response.c @@ -191,6 +191,10 @@ static char error_504_page[] = static ngx_str_t error_pages[] = { + ngx_null_string, /* 204 */ + +#define NGX_HTTP_LEVEL_200 1 + /* ngx_null_string, */ /* 300 */ ngx_string(error_301_page), ngx_string(error_302_page), @@ -290,17 +294,23 @@ ngx_http_special_response_handler(ngx_http_request_t *r, ngx_int_t error) } } - if (error < NGX_HTTP_BAD_REQUEST) { + if (error == NGX_HTTP_NO_CONTENT) { + /* 204 */ + err = 0; + + } else if (error < NGX_HTTP_BAD_REQUEST) { /* 3XX */ err = error - NGX_HTTP_MOVED_PERMANENTLY; } else if (error < NGX_HTTP_NGX_CODES) { /* 4XX */ - err = error - NGX_HTTP_BAD_REQUEST + NGX_HTTP_LEVEL_300; + err = error - NGX_HTTP_BAD_REQUEST + NGX_HTTP_LEVEL_200 + + NGX_HTTP_LEVEL_300; } else { /* 49X, 5XX */ - err = error - NGX_HTTP_NGX_CODES + NGX_HTTP_LEVEL_300 + err = error - NGX_HTTP_NGX_CODES + NGX_HTTP_LEVEL_200 + + NGX_HTTP_LEVEL_300 + NGX_HTTP_LEVEL_400; switch (error) { case NGX_HTTP_TO_HTTPS: |