diff options
author | Dmitry Volyntsev <xeioex@nginx.com> | 2017-01-31 21:19:58 +0300 |
---|---|---|
committer | Dmitry Volyntsev <xeioex@nginx.com> | 2017-01-31 21:19:58 +0300 |
commit | 897eaa9215a8f5832fb7bffe5016a22562b90d0a (patch) | |
tree | b93a5f4c0f037d26cdec1c984c29e656069a1878 /src/http/modules/ngx_http_rewrite_module.c | |
parent | 7e080678d61d946891c035d79b73715f1cc57682 (diff) | |
download | nginx-897eaa9215a8f5832fb7bffe5016a22562b90d0a.tar.gz nginx-897eaa9215a8f5832fb7bffe5016a22562b90d0a.zip |
Variables: generic prefix variables.
Diffstat (limited to 'src/http/modules/ngx_http_rewrite_module.c')
-rw-r--r-- | src/http/modules/ngx_http_rewrite_module.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/http/modules/ngx_http_rewrite_module.c b/src/http/modules/ngx_http_rewrite_module.c index 6b2444cbd..a6f1fc820 100644 --- a/src/http/modules/ngx_http_rewrite_module.c +++ b/src/http/modules/ngx_http_rewrite_module.c @@ -917,7 +917,8 @@ ngx_http_rewrite_set(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) value[1].len--; value[1].data++; - v = ngx_http_add_variable(cf, &value[1], NGX_HTTP_VAR_CHANGEABLE); + v = ngx_http_add_variable(cf, &value[1], + NGX_HTTP_VAR_CHANGEABLE|NGX_HTTP_VAR_WEAK); if (v == NULL) { return NGX_CONF_ERROR; } @@ -927,15 +928,7 @@ ngx_http_rewrite_set(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) return NGX_CONF_ERROR; } - if (v->get_handler == NULL - && ngx_strncasecmp(value[1].data, (u_char *) "http_", 5) != 0 - && ngx_strncasecmp(value[1].data, (u_char *) "sent_http_", 10) != 0 - && ngx_strncasecmp(value[1].data, (u_char *) "upstream_http_", 14) != 0 - && ngx_strncasecmp(value[1].data, (u_char *) "cookie_", 7) != 0 - && ngx_strncasecmp(value[1].data, (u_char *) "upstream_cookie_", 16) - != 0 - && ngx_strncasecmp(value[1].data, (u_char *) "arg_", 4) != 0) - { + if (v->get_handler == NULL) { v->get_handler = ngx_http_rewrite_var; v->data = index; } |