diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2005-03-19 12:38:37 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2005-03-19 12:38:37 +0000 |
| commit | c15717285d2157a603bb1b130b26d7baa549be7e (patch) | |
| tree | 56dc8346b22bb2660eecd3bc086d263ac6d67326 /src/http/modules/ngx_http_access_module.c | |
| parent | e12fbfe82a176cd386cdcecfeabf43ac8fd870a4 (diff) | |
| download | nginx-release-0.1.25.tar.gz nginx-release-0.1.25.tar.bz2 | |
nginx-0.1.25-RELEASE importrelease-0.1.25
*) Bugfix: nginx did run on Linux parisc.
*) Feature: nginx now does not start under FreeBSD if the sysctl
kern.ipc.somaxconn value is too big.
*) Bugfix: if a request was internally redirected by the
ngx_http_index_module module to the ngx_http_proxy_module or
ngx_http_fastcgi_module modules, then the index file was not closed
after request completion.
*) Feature: the "proxy_pass" can be used in location with regular
expression.
*) Feature: the ngx_http_rewrite_filter_module module supports the
condition like "if ($HTTP_USER_AGENT ~ MSIE)".
*) Bugfix: nginx started too slow if the large number of addresses and
text values were used in the "geo" directive.
*) Change: a variable name must be declared as "$name" in the "geo"
directive. The previous variant without "$" is still supported, but
will be removed soon.
*) Feature: the "%{VARIABLE}v" logging parameter.
*) Feature: the "set $name value" directive.
*) Bugfix: gcc 4.0 compatibility.
*) Feature: the --with-openssl-opt=OPTIONS autoconfiguration directive.
Diffstat (limited to '')
| -rw-r--r-- | src/http/modules/ngx_http_access_module.c (renamed from src/http/modules/ngx_http_access_handler.c) | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/src/http/modules/ngx_http_access_handler.c b/src/http/modules/ngx_http_access_module.c index 285570f23..685d15d57 100644 --- a/src/http/modules/ngx_http_access_handler.c +++ b/src/http/modules/ngx_http_access_module.c @@ -25,10 +25,10 @@ typedef struct { static ngx_int_t ngx_http_access_handler(ngx_http_request_t *r); static char *ngx_http_access_rule(ngx_conf_t *cf, ngx_command_t *cmd, - void *conf); + void *conf); static void *ngx_http_access_create_loc_conf(ngx_conf_t *cf); static char *ngx_http_access_merge_loc_conf(ngx_conf_t *cf, - void *parent, void *child); + void *parent, void *child); static ngx_int_t ngx_http_access_init(ngx_cycle_t *cycle); @@ -77,7 +77,8 @@ ngx_module_t ngx_http_access_module = { }; -static ngx_int_t ngx_http_access_handler(ngx_http_request_t *r) +static ngx_int_t +ngx_http_access_handler(ngx_http_request_t *r) { ngx_uint_t i; struct sockaddr_in *sin; @@ -117,8 +118,8 @@ static ngx_int_t ngx_http_access_handler(ngx_http_request_t *r) } -static char *ngx_http_access_rule(ngx_conf_t *cf, ngx_command_t *cmd, - void *conf) +static char * +ngx_http_access_rule(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) { ngx_http_access_loc_conf_t *alcf = conf; @@ -127,14 +128,15 @@ static char *ngx_http_access_rule(ngx_conf_t *cf, ngx_command_t *cmd, ngx_http_access_rule_t *rule; if (alcf->rules == NULL) { - alcf->rules = ngx_create_array(cf->pool, 4, + alcf->rules = ngx_array_create(cf->pool, 4, sizeof(ngx_http_access_rule_t)); if (alcf->rules == NULL) { return NGX_CONF_ERROR; } } - if (!(rule = ngx_push_array(alcf->rules))) { + rule = ngx_array_push(alcf->rules); + if (rule == NULL) { return NGX_CONF_ERROR; } @@ -170,11 +172,13 @@ static char *ngx_http_access_rule(ngx_conf_t *cf, ngx_command_t *cmd, } -static void *ngx_http_access_create_loc_conf(ngx_conf_t *cf) +static void * +ngx_http_access_create_loc_conf(ngx_conf_t *cf) { ngx_http_access_loc_conf_t *conf; - if (!(conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_access_loc_conf_t)))) { + conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_access_loc_conf_t)); + if (conf == NULL) { return NGX_CONF_ERROR; } @@ -182,8 +186,8 @@ static void *ngx_http_access_create_loc_conf(ngx_conf_t *cf) } -static char *ngx_http_access_merge_loc_conf(ngx_conf_t *cf, - void *parent, void *child) +static char * +ngx_http_access_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child) { ngx_http_access_loc_conf_t *prev = parent; ngx_http_access_loc_conf_t *conf = child; @@ -196,14 +200,15 @@ static char *ngx_http_access_merge_loc_conf(ngx_conf_t *cf, } -static ngx_int_t ngx_http_access_init(ngx_cycle_t *cycle) +static ngx_int_t +ngx_http_access_init(ngx_cycle_t *cycle) { ngx_http_handler_pt *h; ngx_http_core_main_conf_t *cmcf; cmcf = ngx_http_cycle_get_module_main_conf(cycle, ngx_http_core_module); - h = ngx_push_array(&cmcf->phases[NGX_HTTP_ACCESS_PHASE].handlers); + h = ngx_array_push(&cmcf->phases[NGX_HTTP_ACCESS_PHASE].handlers); if (h == NULL) { return NGX_ERROR; } |
