Mercurial > hg > nginx-vendor-current
diff src/http/ngx_http_core_module.c @ 558:2da4537168f8 NGINX_0_8_31
nginx 0.8.31
*) Feature: now the "error_page" directive may redirect the 301 and 302
responses.
*) Feature: the $geoip_city_continent_code, $geoip_latitude, and
$geoip_longitude variables.
Thanks to Arvind Sundararajan.
*) Feature: now the ngx_http_image_filter_module deletes always EXIF
and other application specific data if the data consume more than 5%
of a JPEG file.
*) Bugfix: nginx closed a connection if a cached response had an empty
body.
Thanks to Piotr Sikora.
*) Bugfix: nginx might not be built by gcc 4.x if the -O2 or higher
optimization option was used.
Thanks to Maxim Dounin and Denis F. Latypoff.
*) Bugfix: regular expressions in location were always tested in
case-sensitive mode; the bug had appeared in 0.8.25.
*) Bugfix: nginx cached a 304 response if there was the "If-None-Match"
header line in a proxied request.
Thanks to Tim Dettrick and David Kostal.
*) Bugfix: nginx/Windows tried to delete a temporary file twice if the
file should replace an already existent file.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Wed, 23 Dec 2009 00:00:00 +0300 |
parents | 25255878df91 |
children | 7fa8dc2315bd |
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -2588,6 +2588,8 @@ ngx_http_core_regex_location(ngx_conf_t #if (NGX_HAVE_CASELESS_FILESYSTEM) rc.options = NGX_REGEX_CASELESS; +#else + rc.options = caseless; #endif clcf->regex = ngx_http_regex_compile(cf, &rc); @@ -2848,7 +2850,7 @@ ngx_http_core_merge_srv_conf(ngx_conf_t if (!conf->listen) { ngx_memzero(&lsopt, sizeof(ngx_http_listen_opt_t)); - sin = (struct sockaddr_in *) &lsopt.sockaddr; + sin = &lsopt.u.sockaddr_in; sin->sin_family = AF_INET; #if (NGX_WIN32) @@ -2865,7 +2867,7 @@ ngx_http_core_merge_srv_conf(ngx_conf_t lsopt.sndbuf = -1; lsopt.wildcard = 1; - (void) ngx_sock_ntop((struct sockaddr *) &lsopt.sockaddr, lsopt.addr, + (void) ngx_sock_ntop(&lsopt.u.sockaddr, lsopt.addr, NGX_SOCKADDR_STRLEN, 1); if (ngx_http_add_listen(cf, conf, &lsopt) == NGX_OK) { @@ -3273,7 +3275,7 @@ ngx_http_core_listen(ngx_conf_t *cf, ngx ngx_memzero(&lsopt, sizeof(ngx_http_listen_opt_t)); - ngx_memcpy(lsopt.sockaddr, u.sockaddr, u.socklen); + ngx_memcpy(&lsopt.u.sockaddr, u.sockaddr, u.socklen); lsopt.socklen = u.socklen; lsopt.backlog = NGX_LISTEN_BACKLOG; @@ -3281,7 +3283,7 @@ ngx_http_core_listen(ngx_conf_t *cf, ngx lsopt.sndbuf = -1; lsopt.wildcard = u.wildcard; - (void) ngx_sock_ntop((struct sockaddr *) &lsopt.sockaddr, lsopt.addr, + (void) ngx_sock_ntop(&lsopt.u.sockaddr, lsopt.addr, NGX_SOCKADDR_STRLEN, 1); for (n = 2; n < cf->args->nelts; n++) { @@ -3378,7 +3380,7 @@ ngx_http_core_listen(ngx_conf_t *cf, ngx #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY) struct sockaddr *sa; - sa = (struct sockaddr *) lsopt.sockaddr; + sa = &lsopt.u.sockaddr; if (sa->sa_family == AF_INET6) { @@ -3898,9 +3900,9 @@ ngx_http_core_error_page(ngx_conf_t *cf, return NGX_CONF_ERROR; } - if (err->status < 400 || err->status > 599) { + if (err->status < 300 || err->status > 599) { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, - "value \"%V\" must be between 400 and 599", + "value \"%V\" must be between 300 and 599", &value[i]); return NGX_CONF_ERROR; } @@ -4318,8 +4320,15 @@ ngx_http_core_pool_size(ngx_conf_t *cf, if (*sp < NGX_MIN_POOL_SIZE) { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, - "pool must be no less than %uz", NGX_MIN_POOL_SIZE); - + "the pool size must be no less than %uz", + NGX_MIN_POOL_SIZE); + return NGX_CONF_ERROR; + } + + if (*sp % NGX_POOL_ALIGNMENT) { + ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, + "the pool size must be a multiple of %uz", + NGX_POOL_ALIGNMENT); return NGX_CONF_ERROR; }