diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2007-07-29 18:55:24 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2007-07-29 18:55:24 +0000 |
| commit | bb7863b2adf69765e3099ffafe9553d228270b9e (patch) | |
| tree | b0400ef088ad5eac14cd70ec564e0d0f99797da7 /src/http/ngx_http_variables.c | |
| parent | c21ad7dae5ef16a3e32a10f989c7c1cfeaebcf7d (diff) | |
| download | nginx-bb7863b2adf69765e3099ffafe9553d228270b9e.tar.gz nginx-bb7863b2adf69765e3099ffafe9553d228270b9e.tar.bz2 | |
r1351 merge:
allow to set $args
Diffstat (limited to '')
| -rw-r--r-- | src/http/ngx_http_variables.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/http/ngx_http_variables.c b/src/http/ngx_http_variables.c index af54d29b0..d693731df 100644 --- a/src/http/ngx_http_variables.c +++ b/src/http/ngx_http_variables.c @@ -13,6 +13,8 @@ static ngx_int_t ngx_http_variable_request(ngx_http_request_t *r, ngx_http_variable_value_t *v, uintptr_t data); +static void ngx_http_variable_request_set(ngx_http_request_t *r, + ngx_http_variable_value_t *v, uintptr_t data); static void ngx_http_variable_request_set_size(ngx_http_request_t *r, ngx_http_variable_value_t *v, uintptr_t data); static ngx_int_t ngx_http_variable_header(ngx_http_request_t *r, @@ -155,9 +157,11 @@ static ngx_http_variable_t ngx_http_core_variables[] = { offsetof(ngx_http_request_t, args), NGX_HTTP_VAR_NOCACHABLE, 0 }, - { ngx_string("args"), NULL, ngx_http_variable_request, + { ngx_string("args"), + ngx_http_variable_request_set, + ngx_http_variable_request, offsetof(ngx_http_request_t, args), - NGX_HTTP_VAR_NOCACHABLE, 0 }, + NGX_HTTP_VAR_CHANGABLE|NGX_HTTP_VAR_NOCACHABLE, 0 }, { ngx_string("request_filename"), NULL, ngx_http_variable_request_filename, 0, @@ -501,6 +505,19 @@ ngx_http_variable_request(ngx_http_request_t *r, ngx_http_variable_value_t *v, static void +ngx_http_variable_request_set(ngx_http_request_t *r, + ngx_http_variable_value_t *v, uintptr_t data) +{ + ngx_str_t *s; + + s = (ngx_str_t *) ((char *) r + data); + + s->len = v->len; + s->data = v->data; +} + + +static void ngx_http_variable_request_set_size(ngx_http_request_t *r, ngx_http_variable_value_t *v, uintptr_t data) { |
