aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_referer_module.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/modules/ngx_http_referer_module.c')
-rw-r--r--src/http/modules/ngx_http_referer_module.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/http/modules/ngx_http_referer_module.c b/src/http/modules/ngx_http_referer_module.c
index 78cc7f4dd..8530084d5 100644
--- a/src/http/modules/ngx_http_referer_module.c
+++ b/src/http/modules/ngx_http_referer_module.c
@@ -363,8 +363,7 @@ ngx_http_valid_referers(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
ngx_http_server_name_t *sn;
ngx_http_core_srv_conf_t *cscf;
- name.len = sizeof("invalid_referer") - 1;
- name.data = (u_char *) "invalid_referer";
+ ngx_str_set(&name, "invalid_referer");
var = ngx_http_add_variable(cf, &name,
NGX_HTTP_VAR_CHANGEABLE|NGX_HTTP_VAR_NOHASH);
@@ -407,8 +406,7 @@ ngx_http_valid_referers(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
continue;
}
- uri.len = 0;
- uri.data = NULL;
+ ngx_str_null(&uri);
if (ngx_strcmp(value[i].data, "server_names") == 0) {