aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2007-05-01 19:58:45 +0000
committerIgor Sysoev <igor@sysoev.ru>2007-05-01 19:58:45 +0000
commit9c710c0569d1f82cd7b754446bd4bc8856f45867 (patch)
treefb5187f38ead64c29c6a814af15866fa2f74dfb3
parent60e8440bf72f734d54c9527e4aeac2cd2aec2830 (diff)
downloadnginx-9c710c0569d1f82cd7b754446bd4bc8856f45867.tar.gz
nginx-9c710c0569d1f82cd7b754446bd4bc8856f45867.zip
allow to "set" $http_, $sent_http_, and $upstream_http_ variables
-rw-r--r--src/http/modules/ngx_http_rewrite_module.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/http/modules/ngx_http_rewrite_module.c b/src/http/modules/ngx_http_rewrite_module.c
index 274991e4d..1b660c308 100644
--- a/src/http/modules/ngx_http_rewrite_module.c
+++ b/src/http/modules/ngx_http_rewrite_module.c
@@ -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;
}