Welcome! Log In Create A New Profile

Advanced

[nginx] Setting $args now invalidates unparsed uri.

Maxim Dounin
May 19, 2014 02:48PM
details: http://hg.nginx.org/nginx/rev/e9dbffc18a77
branches:
changeset: 5699:e9dbffc18a77
user: Maxim Dounin <mdounin@mdounin.ru>
date: Mon May 19 22:45:35 2014 +0400
description:
Setting $args now invalidates unparsed uri.

Prodded by Yichun Zhang.

diffstat:

src/http/ngx_http_variables.c | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)

diffs (67 lines):

diff --git a/src/http/ngx_http_variables.c b/src/http/ngx_http_variables.c
--- a/src/http/ngx_http_variables.c
+++ b/src/http/ngx_http_variables.c
@@ -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_schem
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_cor
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_reque
}


+#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_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
}


+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)

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Setting $args now invalidates unparsed uri.

Maxim Dounin 850 May 19, 2014 02:48PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 143
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready