aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2010-09-06 14:19:18 +0000
committerIgor Sysoev <igor@sysoev.ru>2010-09-06 14:19:18 +0000
commit12f4da469593eaf859502a24ed2af57d006b7d6e (patch)
tree09e54e1c36cb9730339d6bf84fe459a8664db47e /src
parentc13a4098b7621d5322a58409c0cf2e942f758e96 (diff)
downloadnginx-12f4da469593eaf859502a24ed2af57d006b7d6e.tar.gz
nginx-12f4da469593eaf859502a24ed2af57d006b7d6e.zip
discard "secure_link_expires on|off"
Diffstat (limited to 'src')
-rw-r--r--src/http/modules/ngx_http_secure_link_module.c36
1 files changed, 11 insertions, 25 deletions
diff --git a/src/http/modules/ngx_http_secure_link_module.c b/src/http/modules/ngx_http_secure_link_module.c
index 24af22bd7..970eb8e7b 100644
--- a/src/http/modules/ngx_http_secure_link_module.c
+++ b/src/http/modules/ngx_http_secure_link_module.c
@@ -14,7 +14,6 @@ typedef struct {
ngx_http_complex_value_t *variable;
ngx_http_complex_value_t *md5;
ngx_str_t secret;
- ngx_flag_t expires;
} ngx_http_secure_link_conf_t;
@@ -50,13 +49,6 @@ static ngx_command_t ngx_http_secure_link_commands[] = {
offsetof(ngx_http_secure_link_conf_t, md5),
NULL },
- { ngx_string("secure_link_expires"),
- NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,
- ngx_conf_set_flag_slot,
- NGX_HTTP_LOC_CONF_OFFSET,
- offsetof(ngx_http_secure_link_conf_t, expires),
- NULL },
-
{ ngx_string("secure_link_secret"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
ngx_conf_set_str_slot,
@@ -141,22 +133,20 @@ ngx_http_secure_link_variable(ngx_http_request_t *r,
if (p) {
val.len = p++ - val.data;
- if (conf->expires) {
- expires = ngx_atotm(p, last - p);
- if (expires <= 0) {
- goto not_found;
- }
+ expires = ngx_atotm(p, last - p);
+ if (expires <= 0) {
+ goto not_found;
+ }
- ctx = ngx_pcalloc(r->pool, sizeof(ngx_http_secure_link_ctx_t));
- if (ctx == NULL) {
- return NGX_ERROR;
- }
+ ctx = ngx_pcalloc(r->pool, sizeof(ngx_http_secure_link_ctx_t));
+ if (ctx == NULL) {
+ return NGX_ERROR;
+ }
- ngx_http_set_ctx(r, ctx, ngx_http_secure_link_module);
+ ngx_http_set_ctx(r, ctx, ngx_http_secure_link_module);
- ctx->expires.len = last - p;
- ctx->expires.data = p;
- }
+ ctx->expires.len = last - p;
+ ctx->expires.data = p;
}
if (val.len > 24) {
@@ -317,8 +307,6 @@ ngx_http_secure_link_create_conf(ngx_conf_t *cf)
* conf->secret = { 0, NULL };
*/
- conf->expires = NGX_CONF_UNSET;
-
return conf;
}
@@ -339,8 +327,6 @@ ngx_http_secure_link_merge_conf(ngx_conf_t *cf, void *parent, void *child)
conf->md5 = prev->md5;
}
- ngx_conf_merge_value(conf->expires, prev->expires, 0);
-
return NGX_CONF_OK;
}