comparison src/http/modules/ngx_http_referer_module.c @ 601:77f77f53214a release-0.3.22

nginx-0.3.22-RELEASE import *) 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; the bug had appeared in 0.3.18.
author Igor Sysoev <igor@sysoev.ru>
date Tue, 17 Jan 2006 20:04:32 +0000
parents 869b6444d234
children 858700ae46b4
comparison
equal deleted inserted replaced
600:2d3a5a03e738 601:77f77f53214a
88 ngx_http_referer_conf_t *rlcf; 88 ngx_http_referer_conf_t *rlcf;
89 u_char buf[256]; 89 u_char buf[256];
90 90
91 rlcf = ngx_http_get_module_loc_conf(r, ngx_http_referer_module); 91 rlcf = ngx_http_get_module_loc_conf(r, ngx_http_referer_module);
92 92
93 if (rlcf->hash.buckets == NULL 93 if (rlcf->hash.buckets == NULL && rlcf->dns_wildcards == NULL) {
94 && rlcf->dns_wildcards == NULL
95 && rlcf->dns_wildcards->hash.buckets == NULL)
96 {
97 goto valid; 94 goto valid;
98 } 95 }
99 96
100 if (r->headers_in.referer == NULL) { 97 if (r->headers_in.referer == NULL) {
101 if (rlcf->no_referer) { 98 if (rlcf->no_referer) {
143 if (uri) { 140 if (uri) {
144 goto uri; 141 goto uri;
145 } 142 }
146 } 143 }
147 144
148 if (rlcf->dns_wildcards && rlcf->dns_wildcards->hash.buckets) { 145 if (rlcf->dns_wildcards) {
149 uri = ngx_hash_find_wildcard(rlcf->dns_wildcards, buf, len); 146 uri = ngx_hash_find_wildcard(rlcf->dns_wildcards, buf, len);
150 if (uri) { 147 if (uri) {
151 goto uri; 148 goto uri;
152 } 149 }
153 } 150 }