diff src/http/ngx_http_core_module.c @ 508:4b0d7f0bf22b NGINX_0_8_6

nginx 0.8.6 *) Feature: the ngx_http_geoip_module. *) Bugfix: XSLT filter may fail with message "not well formed XML document" for valid XML document. Thanks to Kuramoto Eiji. *) Bugfix: now in MacOSX, Cygwin, and nginx/Windows locations given by a regular expression are always tested in case insensitive mode; *) Bugfix: now nginx/Windows ignores trailing dots in URI. Thanks to Hugo Leisink. *) Bugfix: name of file specified in --conf-path was not honored during installation; the bug had appeared in 0.6.6. Thanks to Maxim Dounin.
author Igor Sysoev <http://sysoev.ru>
date Mon, 20 Jul 2009 00:00:00 +0400
parents f39b9e29530d
children 86dad910eeb6
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -1228,10 +1228,7 @@ ngx_http_core_try_files_phase(ngx_http_r
             ngx_memcpy(p, name, path.len);
         }
 
-        if (ngx_http_set_exten(r) != NGX_OK) {
-            ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
-            return NGX_OK;
-        }
+        ngx_http_set_exten(r);
 
         ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
                        "try file uri: \"%V\"", &r->uri);
@@ -1641,7 +1638,7 @@ ngx_http_set_content_type(ngx_http_reque
 }
 
 
-ngx_int_t
+void
 ngx_http_set_exten(ngx_http_request_t *r)
 {
     ngx_int_t  i;
@@ -1655,14 +1652,14 @@ ngx_http_set_exten(ngx_http_request_t *r
             r->exten.len = r->uri.len - i - 1;
             r->exten.data = &r->uri.data[i + 1];
 
-            break;
+            return;
 
         } else if (r->uri.data[i] == '/') {
-            break;
+            return;
         }
     }
 
-    return NGX_OK;
+    return;
 }
 
 
@@ -2087,9 +2084,7 @@ ngx_http_subrequest(ngx_http_request_t *
     sr->method_name = ngx_http_core_get_method;
     sr->http_protocol = r->http_protocol;
 
-    if (ngx_http_set_exten(sr) != NGX_OK) {
-        return NGX_ERROR;
-    }
+    ngx_http_set_exten(sr);
 
     sr->main = r->main;
     sr->parent = r;
@@ -2168,10 +2163,7 @@ ngx_http_internal_redirect(ngx_http_requ
     ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
                    "internal redirect: \"%V?%V\"", uri, &r->args);
 
-    if (ngx_http_set_exten(r) != NGX_OK) {
-        ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
-        return NGX_DONE;
-    }
+    ngx_http_set_exten(r);
 
     /* clear the modules contexts */
     ngx_memzero(r->ctx, sizeof(void *) * ngx_http_max_module);
@@ -2574,6 +2566,10 @@ ngx_http_core_regex_location(ngx_conf_t 
     err.len = NGX_MAX_CONF_ERRSTR;
     err.data = errstr;
 
+#if (NGX_HAVE_CASELESS_FILESYSTEM)
+    caseless = 1;
+#endif
+
     clcf->regex = ngx_regex_compile(regex, caseless ? NGX_REGEX_CASELESS: 0,
                                     cf->pool, &err);