Mercurial > hg > nginx-vendor-current
comparison src/http/modules/ngx_http_access_module.c @ 212:56688ed172c8 NGINX_0_3_53
nginx 0.3.53
*) Change: the "add_header" directive adds the string to 204, 301, and
302 responses.
*) Feature: the "server" directive in the "upstream" context supports
the "weight" parameter.
*) Feature: the "server_name" directive supports the "*" wildcard.
*) Feature: nginx supports the request body size more than 2G.
*) Bugfix: if a client was successfully authorized using "satisfy_any
on", then anyway the message "access forbidden by rule" was written
in the log.
*) Bugfix: the "PUT" method may erroneously not create a file and
return the 409 code.
*) Bugfix: if the IMAP/POP3 backend returned an error, then nginx
continued proxying anyway.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Fri, 07 Jul 2006 00:00:00 +0400 |
parents | 4cd3e70c4d60 |
children | fa32d59d9a15 |
comparison
equal
deleted
inserted
replaced
211:f04a54878110 | 212:56688ed172c8 |
---|---|
90 ngx_http_access_handler(ngx_http_request_t *r) | 90 ngx_http_access_handler(ngx_http_request_t *r) |
91 { | 91 { |
92 ngx_uint_t i; | 92 ngx_uint_t i; |
93 struct sockaddr_in *sin; | 93 struct sockaddr_in *sin; |
94 ngx_http_access_rule_t *rule; | 94 ngx_http_access_rule_t *rule; |
95 ngx_http_core_loc_conf_t *clcf; | |
95 ngx_http_access_loc_conf_t *alcf; | 96 ngx_http_access_loc_conf_t *alcf; |
96 | 97 |
97 alcf = ngx_http_get_module_loc_conf(r, ngx_http_access_module); | 98 alcf = ngx_http_get_module_loc_conf(r, ngx_http_access_module); |
98 | 99 |
99 if (alcf->rules == NULL) { | 100 if (alcf->rules == NULL) { |
111 "access: %08XD %08XD %08XD", | 112 "access: %08XD %08XD %08XD", |
112 sin->sin_addr.s_addr, rule[i].mask, rule[i].addr); | 113 sin->sin_addr.s_addr, rule[i].mask, rule[i].addr); |
113 | 114 |
114 if ((sin->sin_addr.s_addr & rule[i].mask) == rule[i].addr) { | 115 if ((sin->sin_addr.s_addr & rule[i].mask) == rule[i].addr) { |
115 if (rule[i].deny) { | 116 if (rule[i].deny) { |
116 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, | 117 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); |
117 "access forbidden by rule"); | 118 |
119 if (!clcf->satisfy_any) { | |
120 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, | |
121 "access forbidden by rule"); | |
122 } | |
118 | 123 |
119 return NGX_HTTP_FORBIDDEN; | 124 return NGX_HTTP_FORBIDDEN; |
120 } | 125 } |
121 | 126 |
122 return NGX_OK; | 127 return NGX_OK; |