mirror of
https://github.com/nginx/nginx.git
synced 2025-06-07 17:52:38 +08:00
Setting $args now invalidates unparsed uri.
Prodded by Yichun Zhang.
This commit is contained in:
parent
4884cd611e
commit
84409ec8e0
@ -13,8 +13,10 @@
|
||||
|
||||
static ngx_int_t ngx_http_variable_request(ngx_http_request_t *r,
|
||||
ngx_http_variable_value_t *v, uintptr_t data);
|
||||
#if 0
|
||||
static void ngx_http_variable_request_set(ngx_http_request_t *r,
|
||||
ngx_http_variable_value_t *v, uintptr_t data);
|
||||
#endif
|
||||
static ngx_int_t ngx_http_variable_request_get_size(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,
|
||||
@ -64,6 +66,8 @@ static ngx_int_t ngx_http_variable_scheme(ngx_http_request_t *r,
|
||||
ngx_http_variable_value_t *v, uintptr_t data);
|
||||
static ngx_int_t ngx_http_variable_https(ngx_http_request_t *r,
|
||||
ngx_http_variable_value_t *v, uintptr_t data);
|
||||
static void ngx_http_variable_set_args(ngx_http_request_t *r,
|
||||
ngx_http_variable_value_t *v, uintptr_t data);
|
||||
static ngx_int_t ngx_http_variable_is_args(ngx_http_request_t *r,
|
||||
ngx_http_variable_value_t *v, uintptr_t data);
|
||||
static ngx_int_t ngx_http_variable_document_root(ngx_http_request_t *r,
|
||||
@ -223,7 +227,7 @@ static ngx_http_variable_t ngx_http_core_variables[] = {
|
||||
NGX_HTTP_VAR_NOCACHEABLE, 0 },
|
||||
|
||||
{ ngx_string("args"),
|
||||
ngx_http_variable_request_set,
|
||||
ngx_http_variable_set_args,
|
||||
ngx_http_variable_request,
|
||||
offsetof(ngx_http_request_t, args),
|
||||
NGX_HTTP_VAR_CHANGEABLE|NGX_HTTP_VAR_NOCACHEABLE, 0 },
|
||||
@ -662,6 +666,8 @@ ngx_http_variable_request(ngx_http_request_t *r, ngx_http_variable_value_t *v,
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
|
||||
static void
|
||||
ngx_http_variable_request_set(ngx_http_request_t *r,
|
||||
ngx_http_variable_value_t *v, uintptr_t data)
|
||||
@ -674,6 +680,8 @@ ngx_http_variable_request_set(ngx_http_request_t *r,
|
||||
s->data = v->data;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
static ngx_int_t
|
||||
ngx_http_variable_request_get_size(ngx_http_request_t *r,
|
||||
@ -1371,6 +1379,16 @@ ngx_http_variable_https(ngx_http_request_t *r,
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
ngx_http_variable_set_args(ngx_http_request_t *r,
|
||||
ngx_http_variable_value_t *v, uintptr_t data)
|
||||
{
|
||||
r->args.len = v->len;
|
||||
r->args.data = v->data;
|
||||
r->valid_unparsed_uri = 0;
|
||||
}
|
||||
|
||||
|
||||
static ngx_int_t
|
||||
ngx_http_variable_is_args(ngx_http_request_t *r,
|
||||
ngx_http_variable_value_t *v, uintptr_t data)
|
||||
|
Loading…
Reference in New Issue
Block a user