aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2010-06-30 13:15:20 +0000
committerIgor Sysoev <igor@sysoev.ru>2010-06-30 13:15:20 +0000
commit6db47f4c81a311ee1b63dded69e6987ea4bf419c (patch)
tree37973ae6982d1ae686235cdb1e5ec94f9d90ce5d
parentce03ba019edfc2c7dcb0974415ab054e8129600b (diff)
downloadnginx-6db47f4c81a311ee1b63dded69e6987ea4bf419c.tar.gz
nginx-6db47f4c81a311ee1b63dded69e6987ea4bf419c.zip
set uid values for main request only
-rw-r--r--src/http/modules/ngx_http_userid_filter_module.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/http/modules/ngx_http_userid_filter_module.c b/src/http/modules/ngx_http_userid_filter_module.c
index 412a1370e..2f3f05468 100644
--- a/src/http/modules/ngx_http_userid_filter_module.c
+++ b/src/http/modules/ngx_http_userid_filter_module.c
@@ -248,14 +248,14 @@ ngx_http_userid_got_variable(ngx_http_request_t *r,
return NGX_OK;
}
- ctx = ngx_http_userid_get_uid(r, conf);
+ ctx = ngx_http_userid_get_uid(r->main, conf);
if (ctx == NULL) {
return NGX_ERROR;
}
if (ctx->uid_got[3] != 0) {
- return ngx_http_userid_variable(r, v, &conf->name, ctx->uid_got);
+ return ngx_http_userid_variable(r->main, v, &conf->name, ctx->uid_got);
}
v->not_found = 1;
@@ -271,14 +271,14 @@ ngx_http_userid_set_variable(ngx_http_request_t *r,
ngx_http_userid_ctx_t *ctx;
ngx_http_userid_conf_t *conf;
- conf = ngx_http_get_module_loc_conf(r, ngx_http_userid_filter_module);
+ conf = ngx_http_get_module_loc_conf(r->main, ngx_http_userid_filter_module);
if (conf->enable < NGX_HTTP_USERID_V1) {
v->not_found = 1;
return NGX_OK;
}
- ctx = ngx_http_userid_get_uid(r, conf);
+ ctx = ngx_http_userid_get_uid(r->main, conf);
if (ctx == NULL) {
return NGX_ERROR;
@@ -291,12 +291,12 @@ ngx_http_userid_set_variable(ngx_http_request_t *r,
return NGX_OK;
}
- if (ngx_http_userid_create_uid(r, ctx, conf) != NGX_OK) {
+ if (ngx_http_userid_create_uid(r->main, ctx, conf) != NGX_OK) {
return NGX_ERROR;
}
}
- return ngx_http_userid_variable(r, v, &conf->name, ctx->uid_set);
+ return ngx_http_userid_variable(r->main, v, &conf->name, ctx->uid_set);
}