]> git.kaiwu.me - nginx.git/commitdiff
allow to "set" $http_, $sent_http_, and $upstream_http_ variables
authorIgor Sysoev <igor@sysoev.ru>
Tue, 1 May 2007 19:58:45 +0000 (19:58 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Tue, 1 May 2007 19:58:45 +0000 (19:58 +0000)
src/http/modules/ngx_http_rewrite_module.c

index 274991e4dd855509658c83d747c27e7134b7a54f..1b660c3080b1b437d8bcefa954314edb36495652 100644 (file)
@@ -935,7 +935,11 @@ ngx_http_rewrite_set(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
         return NGX_CONF_ERROR;
     }
 
-    if (v->get_handler == NULL) {
+    if (v->get_handler == NULL
+        && ngx_strncasecmp(value[1].data, "http_", 5) != 0
+        && ngx_strncasecmp(value[1].data, "sent_http_", 10) != 0
+        && ngx_strncasecmp(value[1].data, "upstream_http_", 14) != 0)
+    {
         v->get_handler = ngx_http_rewrite_var;
         v->data = index;
     }