Mercurial > hg > nginx
comparison src/http/modules/ngx_http_access_module.c @ 1786:adca43955f79
return NGX_DECLINED if access directives are not active,
this fixes case when satisfy any does not test active directives at all
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 27 Dec 2007 14:15:34 +0000 |
parents | b590a528fd41 |
children | ba9e6e57f65d |
comparison
equal
deleted
inserted
replaced
1785:0673b54f34f7 | 1786:adca43955f79 |
---|---|
96 ngx_http_access_loc_conf_t *alcf; | 96 ngx_http_access_loc_conf_t *alcf; |
97 | 97 |
98 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); |
99 | 99 |
100 if (alcf->rules == NULL) { | 100 if (alcf->rules == NULL) { |
101 return NGX_OK; | 101 return NGX_DECLINED; |
102 } | 102 } |
103 | 103 |
104 /* AF_INET only */ | 104 /* AF_INET only */ |
105 | 105 |
106 sin = (struct sockaddr_in *) r->connection->sockaddr; | 106 sin = (struct sockaddr_in *) r->connection->sockaddr; |
126 | 126 |
127 return NGX_OK; | 127 return NGX_OK; |
128 } | 128 } |
129 } | 129 } |
130 | 130 |
131 return NGX_OK; | 131 return NGX_DECLINED; |
132 } | 132 } |
133 | 133 |
134 | 134 |
135 static char * | 135 static char * |
136 ngx_http_access_rule(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) | 136 ngx_http_access_rule(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) |