Mercurial > hg > nginx-vendor-current
diff src/http/ngx_http_core_module.c @ 686:2e8a942c8872 NGINX_1_3_6
nginx 1.3.6
*) Feature: the ngx_http_gunzip_filter_module.
*) Feature: the "memcached_gzip_flag" directive.
*) Feature: the "always" parameter of the "gzip_static" directive.
*) Bugfix: in the "limit_req" directive; the bug had appeared in 1.1.14.
Thanks to Charles Chen.
*) Bugfix: nginx could not be built by gcc 4.7 with -O2 optimization if
the --with-ipv6 option was used.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Wed, 12 Sep 2012 00:00:00 +0400 |
parents | 660139fd80ca |
children | 6db6e93f55ee |
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -2776,7 +2776,15 @@ ngx_http_get_forwarded_addr(ngx_http_req if (IN6_IS_ADDR_V4MAPPED(inaddr6)) { family = AF_INET; - inaddr = *(in_addr_t *) &inaddr6->s6_addr[12]; + + p = inaddr6->s6_addr; + + inaddr = p[12] << 24; + inaddr += p[13] << 16; + inaddr += p[14] << 8; + inaddr += p[15]; + + inaddr = htonl(inaddr); } } #endif @@ -3236,7 +3244,7 @@ ngx_http_core_type(ngx_conf_t *cf, ngx_c { ngx_http_core_loc_conf_t *clcf = conf; - ngx_str_t *value, *content_type, *old, file; + ngx_str_t *value, *content_type, *old; ngx_uint_t i, n, hash; ngx_hash_key_t *type; @@ -3249,15 +3257,8 @@ ngx_http_core_type(ngx_conf_t *cf, ngx_c " in \"include\" directive"); return NGX_CONF_ERROR; } - file = value[1]; - - if (ngx_conf_full_name(cf->cycle, &file, 1) != NGX_OK) { - return NGX_CONF_ERROR; - } - - ngx_log_debug1(NGX_LOG_DEBUG_CORE, cf->log, 0, "include %s", file.data); - - return ngx_conf_parse(cf, &file); + + return ngx_conf_include(cf, dummy, conf); } content_type = ngx_palloc(cf->pool, sizeof(ngx_str_t));