nginx-0.1.6-RELEASE import

    *) Bugfix: some location directive combinations with the regular
       expressions caused the wrong configuration choose.
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index 7e8cf69..29a6f76 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -992,6 +992,11 @@
         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 @@
 
     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 @@
         }
 
     } 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];