diff src/http/modules/ngx_http_referer_module.c @ 150:50bd986c5d63 NGINX_0_3_22

nginx 0.3.22 *) Feature: the ngx_http_perl_module supports the $r->args and $r->unescape methods. *) Feature: the method $r->query_string of ngx_http_perl_module was canceled. *) Bugfix: segmentation fault was occurred if the "none" or "blocked" values was specified in the "valid_referers" directive; bug appeared in 0.3.18.
author Igor Sysoev <http://sysoev.ru>
date Tue, 17 Jan 2006 00:00:00 +0300
parents ea622d8acb38
children 396dbbc06dd7
line wrap: on
line diff
--- a/src/http/modules/ngx_http_referer_module.c
+++ b/src/http/modules/ngx_http_referer_module.c
@@ -90,10 +90,7 @@ ngx_http_referer_variable(ngx_http_reque
 
     rlcf = ngx_http_get_module_loc_conf(r, ngx_http_referer_module);
 
-    if (rlcf->hash.buckets == NULL
-        && rlcf->dns_wildcards == NULL
-        && rlcf->dns_wildcards->hash.buckets == NULL)
-    {
+    if (rlcf->hash.buckets == NULL && rlcf->dns_wildcards == NULL) {
         goto valid;
     }
 
@@ -145,7 +142,7 @@ ngx_http_referer_variable(ngx_http_reque
         }
     }
 
-    if (rlcf->dns_wildcards && rlcf->dns_wildcards->hash.buckets) {
+    if (rlcf->dns_wildcards) {
         uri = ngx_hash_find_wildcard(rlcf->dns_wildcards, buf, len);
         if (uri) {
             goto uri;