diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2010-05-14 09:56:37 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2010-05-14 09:56:37 +0000 |
| commit | 05b1a8f1e3595beab4397e25c2a6db9d832a6a97 (patch) | |
| tree | 282923e87cbaf9d634dab4a7c69ce85d602effcf /src/http/modules/ngx_http_referer_module.c | |
| parent | 328df7a5cc91180fef3b1b58129e14bc79bef80b (diff) | |
| download | nginx-05b1a8f1e3595beab4397e25c2a6db9d832a6a97.tar.gz nginx-05b1a8f1e3595beab4397e25c2a6db9d832a6a97.tar.bz2 | |
ngx_str_set() and ngx_str_null()
Diffstat (limited to 'src/http/modules/ngx_http_referer_module.c')
| -rw-r--r-- | src/http/modules/ngx_http_referer_module.c | 6 |
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) { |
