comparison 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
comparison
equal deleted inserted replaced
685:0a9f545d4f4b 686:2e8a942c8872
2774 else if (family == AF_INET6) { 2774 else if (family == AF_INET6) {
2775 inaddr6 = &((struct sockaddr_in6 *) addr->sockaddr)->sin6_addr; 2775 inaddr6 = &((struct sockaddr_in6 *) addr->sockaddr)->sin6_addr;
2776 2776
2777 if (IN6_IS_ADDR_V4MAPPED(inaddr6)) { 2777 if (IN6_IS_ADDR_V4MAPPED(inaddr6)) {
2778 family = AF_INET; 2778 family = AF_INET;
2779 inaddr = *(in_addr_t *) &inaddr6->s6_addr[12]; 2779
2780 p = inaddr6->s6_addr;
2781
2782 inaddr = p[12] << 24;
2783 inaddr += p[13] << 16;
2784 inaddr += p[14] << 8;
2785 inaddr += p[15];
2786
2787 inaddr = htonl(inaddr);
2780 } 2788 }
2781 } 2789 }
2782 #endif 2790 #endif
2783 2791
2784 for (cidr = proxies->elts, i = 0; i < proxies->nelts; i++) { 2792 for (cidr = proxies->elts, i = 0; i < proxies->nelts; i++) {
3234 static char * 3242 static char *
3235 ngx_http_core_type(ngx_conf_t *cf, ngx_command_t *dummy, void *conf) 3243 ngx_http_core_type(ngx_conf_t *cf, ngx_command_t *dummy, void *conf)
3236 { 3244 {
3237 ngx_http_core_loc_conf_t *clcf = conf; 3245 ngx_http_core_loc_conf_t *clcf = conf;
3238 3246
3239 ngx_str_t *value, *content_type, *old, file; 3247 ngx_str_t *value, *content_type, *old;
3240 ngx_uint_t i, n, hash; 3248 ngx_uint_t i, n, hash;
3241 ngx_hash_key_t *type; 3249 ngx_hash_key_t *type;
3242 3250
3243 value = cf->args->elts; 3251 value = cf->args->elts;
3244 3252
3247 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, 3255 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
3248 "invalid number of arguments" 3256 "invalid number of arguments"
3249 " in \"include\" directive"); 3257 " in \"include\" directive");
3250 return NGX_CONF_ERROR; 3258 return NGX_CONF_ERROR;
3251 } 3259 }
3252 file = value[1]; 3260
3253 3261 return ngx_conf_include(cf, dummy, conf);
3254 if (ngx_conf_full_name(cf->cycle, &file, 1) != NGX_OK) {
3255 return NGX_CONF_ERROR;
3256 }
3257
3258 ngx_log_debug1(NGX_LOG_DEBUG_CORE, cf->log, 0, "include %s", file.data);
3259
3260 return ngx_conf_parse(cf, &file);
3261 } 3262 }
3262 3263
3263 content_type = ngx_palloc(cf->pool, sizeof(ngx_str_t)); 3264 content_type = ngx_palloc(cf->pool, sizeof(ngx_str_t));
3264 if (content_type == NULL) { 3265 if (content_type == NULL) {
3265 return NGX_CONF_ERROR; 3266 return NGX_CONF_ERROR;