Mercurial > hg > nginx
diff src/http/modules/ngx_http_access_module.c @ 501:d4ea69372b94 release-0.1.25
nginx-0.1.25-RELEASE import
*) 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.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sat, 19 Mar 2005 12:38:37 +0000 |
parents | src/http/modules/ngx_http_access_handler.c@64d9afb209da |
children | 9b8c906f6e63 |
line wrap: on
line diff
copy from src/http/modules/ngx_http_access_handler.c copy to src/http/modules/ngx_http_access_module.c --- 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 } -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_co 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_co } -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_ } -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_c } -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; }