diff options
author | Igor Sysoev <igor@sysoev.ru> | 2005-02-16 13:40:36 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2005-02-16 13:40:36 +0000 |
commit | 1ebfead9da0596e8e84231f7ea8ba25a650a4d1e (patch) | |
tree | 15e18d104477e04ffb5fcb31b3fb43f20dcfe996 /src/http/ngx_http_core_module.c | |
parent | 675cc5a855cec4acaae2937cb832c424e4d3bacf (diff) | |
download | nginx-1ebfead9da0596e8e84231f7ea8ba25a650a4d1e.tar.gz nginx-1ebfead9da0596e8e84231f7ea8ba25a650a4d1e.zip |
nginx-0.1.19-RELEASE importrelease-0.1.19
*) Bugfix: now, if request contains the zero, then the 404 error is
returned for the local requests.
*) Bugfix: nginx could not be built on NetBSD 2.0.
*) Bugfix: the timeout may occur while reading of the the client
request body via SSL connections.
Diffstat (limited to 'src/http/ngx_http_core_module.c')
-rw-r--r-- | src/http/ngx_http_core_module.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index 8b66a7911..b3c1a1490 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -415,6 +415,8 @@ ngx_http_handler(ngx_http_request_t *r) r->uri_changed = 1; r->uri_changes = 11; + r->phase = NGX_HTTP_REWRITE_PHASE; + r->phase_handler = 0; ngx_http_core_run_phases(r); } @@ -447,11 +449,7 @@ ngx_http_core_run_phases(ngx_http_request_t *r) for (/* void */; r->phase < NGX_HTTP_LAST_PHASE; r->phase++) { - if (r->phase == NGX_HTTP_FIND_CONFIG_PHASE && !r->uri_changed) { - continue; - } - - if (r->phase == NGX_HTTP_FIND_CONFIG_PHASE + 1 && r->uri_changed) { + if (r->phase == NGX_HTTP_REWRITE_PHASE + 1 && r->uri_changed) { ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "uri changes: %d", r->uri_changes); @@ -472,8 +470,7 @@ ngx_http_core_run_phases(ngx_http_request_t *r) return; } - r->uri_changed = 0; - r->phase = NGX_HTTP_REWRITE_PHASE; + r->phase = NGX_HTTP_FIND_CONFIG_PHASE; } if (r->phase == NGX_HTTP_CONTENT_PHASE && r->content_handler) { @@ -525,7 +522,7 @@ ngx_http_core_run_phases(ngx_http_request_t *r) /* no content handler was found */ - if (r->uri.data[r->uri.len - 1] == '/') { + if (r->uri.data[r->uri.len - 1] == '/' && !r->zero_in_uri) { clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); @@ -550,6 +547,9 @@ ngx_http_find_location_config(ngx_http_request_t *r) ngx_http_core_loc_conf_t *clcf; ngx_http_core_srv_conf_t *cscf; + r->content_handler = NULL; + r->uri_changed = 0; + cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module); rc = ngx_http_core_find_location(r, &cscf->locations, 0); @@ -955,10 +955,6 @@ ngx_http_internal_redirect(ngx_http_request_t *r, cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module); r->loc_conf = cscf->ctx->loc_conf; - r->phase = 0; - r->phase_handler = 0; - r->content_handler = NULL; - ngx_http_handler(r); return NGX_DONE; |