aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_special_response.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2006-08-30 10:39:17 +0000
committerIgor Sysoev <igor@sysoev.ru>2006-08-30 10:39:17 +0000
commitda173abde0afa26b02c778d6475462ed487594c5 (patch)
tree25362ec56c889a2284e6feb341d5b87f13b5beab /src/http/ngx_http_special_response.c
parent9cdd8a1cbcf70527db51eeab707a5bc05babdcf3 (diff)
downloadnginx-release-0.4.0.tar.gz
nginx-release-0.4.0.zip
nginx-0.4.0-RELEASE importrelease-0.4.0
*) Change in internal API: the HTTP modules initialization was moved from the init module phase to the HTTP postconfiguration phase. *) Change: now the request body is not read beforehand for the ngx_http_perl_module: it's required to start the reading using the $r->has_request_body method. *) Feature: the ngx_http_perl_module supports the DECLINED return code. *) Feature: the ngx_http_dav_module supports the incoming "Date" header line for the PUT method. *) Feature: the "ssi" directive is available inside the "if" block. *) Bugfix: a segmentation fault occurred if there was an "index" directive with variables and the first index name was without variables; the bug had appeared in 0.1.29.
Diffstat (limited to 'src/http/ngx_http_special_response.c')
-rw-r--r--src/http/ngx_http_special_response.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c
index 71428b0c9..6658ed07c 100644
--- a/src/http/ngx_http_special_response.c
+++ b/src/http/ngx_http_special_response.c
@@ -307,7 +307,7 @@ ngx_http_special_response_handler(ngx_http_request_t *r, ngx_int_t error)
ngx_int_t rc;
ngx_buf_t *b;
ngx_str_t *uri, *location;
- ngx_uint_t i, err, msie_padding;
+ ngx_uint_t i, n, err, msie_padding;
ngx_chain_t *out, *cl;
ngx_http_err_page_t *err_page;
ngx_http_core_loc_conf_t *clcf;
@@ -375,8 +375,23 @@ ngx_http_special_response_handler(ngx_http_request_t *r, ngx_int_t error)
{
return NGX_ERROR;
}
+
+ if (r->zero_in_uri) {
+ for (n = 0; n < uri->len; n++) {
+ if (uri->data[n] == '\0') {
+ goto zero;
+ }
+ }
+
+ r->zero_in_uri = 0;
+ }
+
+ } else {
+ r->zero_in_uri = 0;
}
+ zero:
+
if (uri->data[0] == '/') {
return ngx_http_internal_redirect(r, uri, NULL);
}