]> git.kaiwu.me - nginx.git/commitdiff
fix plain text values using relative path in ngx_http_complex_value(),
authorIgor Sysoev <igor@sysoev.ru>
Fri, 27 Mar 2009 06:34:31 +0000 (06:34 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Fri, 27 Mar 2009 06:34:31 +0000 (06:34 +0000)
this fixes the auth_basic_user_file bug introduced in r2589

src/http/ngx_http_script.c

index 05851ec1dbde5d21e9c776a30521827dbcdff393..b640826e78b06d371fa83ab58e27680dcd895e49 100644 (file)
@@ -118,11 +118,6 @@ ngx_http_compile_complex_value(ngx_http_compile_complex_value_t *ccv)
         return NGX_ERROR;
     }
 
-    ccv->complex_value->value = *v;
-    ccv->complex_value->flushes = NULL;
-    ccv->complex_value->lengths = NULL;
-    ccv->complex_value->values = NULL;
-
     nv = 0;
     nc = 0;
 
@@ -147,6 +142,11 @@ ngx_http_compile_complex_value(ngx_http_compile_complex_value_t *ccv)
         ccv->root_prefix = 0;
     }
 
+    ccv->complex_value->value = *v;
+    ccv->complex_value->flushes = NULL;
+    ccv->complex_value->lengths = NULL;
+    ccv->complex_value->values = NULL;
+
     if (nv == 0 && nc == 0) {
         return NGX_OK;
     }