]> git.kaiwu.me - nginx.git/commitdiff
nginx-0.1.6-RELEASE import release-0.1.6
authorIgor Sysoev <igor@sysoev.ru>
Thu, 11 Nov 2004 20:58:09 +0000 (20:58 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Thu, 11 Nov 2004 20:58:09 +0000 (20:58 +0000)
    *) Bugfix: some location directive combinations with the regular
       expressions caused the wrong configuration choose.

docs/xml/nginx/changes.xml
src/core/nginx.h
src/http/ngx_http_core_module.c

index 52360471c377615bd79b2dc325437bdd5c7a8f29..48f48c0fdfb73ddc6466302dcfcfbcd7c797d078 100644 (file)
@@ -6,6 +6,22 @@
             title="nginx">
 
 
+<changes ver="0.1.6" date="11.11.2004">
+
+<change type="bugfix">
+<para lang="ru">
+ÐÒÉ ÎÅËÏÔÏÒÙÈ ËÏÍÂÉÎÁÃÉÑÈ ÄÉÒÅËÔÉ× location c ÒÅÇÕÌÑÒÎÙÍÉ ×ÙÒÁÖÅÎÉÑÍÉ
+ÉÓÐÏÌØÚÏ×ÁÌÁÓØ ËÏÎÆÉÇÕÒÁÃÉÑ ÎÅ ÉÚ ÔÏÇÏ location.
+</para>
+<para lang="en">
+some location directive combiations with the regular expressions caused
+the wrong configuration choose.
+</para>
+</change>
+
+</changes>
+
+
 <changes ver="0.1.5" date="11.11.2004">
 
 <change type="bugfix">
@@ -22,11 +38,11 @@ alerts.
 <change type="bugfix">
 <para lang="ru">
 × ÒÅÖÉÍÅ ÐÒÏËÓÉ ÂÅÚ ÉÓÐÏÌØÚÏ×ÁÎÉÑ sendfile ÎÁ Solaris ×ÏÚÎÉËÁÌÁ
-ÏÛÉÂËÁ "writev() failed (22: Invalid argument)". îÁ ÄÒÕÇÉÈ ÐÌÁÔÆÏÒÍÁÈ,
-ÎÅ ÐÏÄÄÅÒÖÉ×ÁÀÝÉÈ sendfile, ÐÒÏÃÅÓÓ ÚÁÃÉËÌÉ×ÁÌÓÑ.
+ÏÛÉÂËÁ "writev() failed <nobr>(22: Invalid argument)".</nobr>
+îÁ ÄÒÕÇÉÈ ÐÌÁÔÆÏÒÍÁÈ, ÎÅ ÐÏÄÄÅÒÖÉ×ÁÀÝÉÈ sendfile, ÐÒÏÃÅÓÓ ÚÁÃÉËÌÉ×ÁÌÓÑ.
 </para>
 <para lang="en">
-there were the "writev() failed (22: Invalid argument)" errors on
+there were the "writev() failed <nobr>(22: Invalid argument)"</nobr> errors on
 Solaris in proxy mode without sendfile. On other platforms that do not
 support sendfile at all the process got caught in an endless loop.
 </para>
index 2be26e06b602055bf23ffa593dcfada5a623feb2..a8c5ca1bae60e67abdf3b1e392f5e0bb47fd6b38 100644 (file)
@@ -8,7 +8,7 @@
 #define _NGINX_H_INCLUDED_
 
 
-#define NGINX_VER          "nginx/0.1.5"
+#define NGINX_VER          "nginx/0.1.6"
 
 #define NGINX_VAR          "NGINX"
 #define NGX_NEWPID_EXT     ".newbin"
index 7e8cf6903a9ff7041212e17dad75eee10691d720..29a6f76fc67922ec082f32a46a30992a466cae1e 100644 (file)
@@ -992,6 +992,11 @@ static int ngx_cmp_locations(const void *one, const void *two)
         return 1;
     }
 
+    if (!first->regex && second->regex) {
+        /* shift the regex matches to the end */
+        return -1;
+    }
+
     if (first->regex || second->regex) {
         /* do not sort the regex matches */
         return 0;
@@ -1061,8 +1066,7 @@ static char *ngx_location_block(ngx_conf_t *cf, ngx_command_t *cmd, void *dummy)
 
     if (cf->args->nelts == 3) {
         if (value[1].len == 1 && value[1].data[0] == '=') {
-            clcf->name.len = value[2].len;
-            clcf->name.data = value[2].data;
+            clcf->name = value[2];
             clcf->exact_match = 1;
 
         } else if ((value[1].len == 1 && value[1].data[0] == '~')
@@ -1098,8 +1102,7 @@ static char *ngx_location_block(ngx_conf_t *cf, ngx_command_t *cmd, void *dummy)
         }
 
     } else {
-        clcf->name.len = value[1].len;
-        clcf->name.data = value[1].data;
+        clcf->name = value[1];
     }
 
     pclcf = pctx->loc_conf[ngx_http_core_module.ctx_index];