comparison src/http/ngx_http_core_module.c @ 328:26ff8d6b618d NGINX_0_5_34

nginx 0.5.34 *) Change: now the full request line instead of URI only is written to error_log. *) Feature: Cygwin compatibility. Thanks to Vladimir Kutakov. *) Feature: the "merge_slashes" directive. *) Feature: the "gzip_vary" directive. *) Feature: the "server_tokens" directive. *) Feature: the "access_log" directive may be used inside the "limit_except" block. *) Bugfix: if the $server_protocol was used in FastCGI parameters and a request line length was near to the "client_header_buffer_size" directive value, then nginx issued an alert "fastcgi: the request record is too big". *) Bugfix: if a plain text HTTP/0.9 version request was made to HTTPS server, then nginx returned usual response. *) Bugfix: URL double escaping in a redirect of the "msie_refresh" directive; bug appeared in 0.5.28. *) Bugfix: a segmentation fault might occur in worker process if subrequests were used. *) Bugfix: the big responses may be transferred truncated if SSL and gzip were used. *) Bugfix: compatibility with mget. *) Bugfix: nginx did not unescape URI in the "include" SSI command. *) Bugfix: the segmentation fault was occurred on start or while reconfiguration if variable was used in the "charset" or "source_charset" directives. *) Bugfix: nginx returned the 400 response on requests like "GET http://www.domain.com HTTP/1.0". Thanks to James Oakley. *) Bugfix: a segmentation fault occurred in worker process if $date_local and $date_gmt were used outside the ngx_http_ssi_filter_module. *) Bugfix: a segmentation fault might occur in worker process if debug log was enabled. Thanks to Andrei Nigmatulin. *) Bugfix: ngx_http_memcached_module did not set $upstream_response_time. Thanks to Maxim Dounin. *) Bugfix: a worker process may got caught in an endless loop, if the memcached was used.
author Igor Sysoev <http://sysoev.ru>
date Thu, 13 Dec 2007 00:00:00 +0300
parents f70f2f565fe0
children
comparison
equal deleted inserted replaced
327:cb962a94cd7b 328:26ff8d6b618d
181 ngx_conf_set_flag_slot, 181 ngx_conf_set_flag_slot,
182 NGX_HTTP_SRV_CONF_OFFSET, 182 NGX_HTTP_SRV_CONF_OFFSET,
183 offsetof(ngx_http_core_srv_conf_t, ignore_invalid_headers), 183 offsetof(ngx_http_core_srv_conf_t, ignore_invalid_headers),
184 NULL }, 184 NULL },
185 185
186 { ngx_string("merge_slashes"),
187 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_FLAG,
188 ngx_conf_set_flag_slot,
189 NGX_HTTP_SRV_CONF_OFFSET,
190 offsetof(ngx_http_core_srv_conf_t, merge_slashes),
191 NULL },
192
186 { ngx_string("location"), 193 { ngx_string("location"),
187 NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_BLOCK|NGX_CONF_TAKE12, 194 NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_BLOCK|NGX_CONF_TAKE12,
188 ngx_http_core_location, 195 ngx_http_core_location,
189 NGX_HTTP_SRV_CONF_OFFSET, 196 NGX_HTTP_SRV_CONF_OFFSET,
190 0, 197 0,
421 { ngx_string("recursive_error_pages"), 428 { ngx_string("recursive_error_pages"),
422 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, 429 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,
423 ngx_conf_set_flag_slot, 430 ngx_conf_set_flag_slot,
424 NGX_HTTP_LOC_CONF_OFFSET, 431 NGX_HTTP_LOC_CONF_OFFSET,
425 offsetof(ngx_http_core_loc_conf_t, recursive_error_pages), 432 offsetof(ngx_http_core_loc_conf_t, recursive_error_pages),
433 NULL },
434
435 { ngx_string("server_tokens"),
436 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,
437 ngx_conf_set_flag_slot,
438 NGX_HTTP_LOC_CONF_OFFSET,
439 offsetof(ngx_http_core_loc_conf_t, server_tokens),
426 NULL }, 440 NULL },
427 441
428 { ngx_string("error_page"), 442 { ngx_string("error_page"),
429 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF 443 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
430 |NGX_CONF_2MORE, 444 |NGX_CONF_2MORE,
660 && !r->discard_body 674 && !r->discard_body
661 && clcf->client_max_body_size 675 && clcf->client_max_body_size
662 && clcf->client_max_body_size < r->headers_in.content_length_n) 676 && clcf->client_max_body_size < r->headers_in.content_length_n)
663 { 677 {
664 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, 678 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
665 "client intented to send too large body: %O bytes", 679 "client intended to send too large body: %O bytes",
666 r->headers_in.content_length_n); 680 r->headers_in.content_length_n);
667 681
668 ngx_http_finalize_request(r, NGX_HTTP_REQUEST_ENTITY_TOO_LARGE); 682 ngx_http_finalize_request(r, NGX_HTTP_REQUEST_ENTITY_TOO_LARGE);
669 return NGX_OK; 683 return NGX_OK;
670 } 684 }
1576 1590
1577 return NGX_DONE; 1591 return NGX_DONE;
1578 } 1592 }
1579 1593
1580 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, 1594 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
1581 "could not find name location \"%V\"", name); 1595 "could not find named location \"%V\"", name);
1582 1596
1583 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); 1597 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
1584 return NGX_DONE; 1598 return NGX_DONE;
1585 } 1599 }
1586 1600
2211 cscf->request_pool_size = NGX_CONF_UNSET_SIZE; 2225 cscf->request_pool_size = NGX_CONF_UNSET_SIZE;
2212 cscf->client_header_timeout = NGX_CONF_UNSET_MSEC; 2226 cscf->client_header_timeout = NGX_CONF_UNSET_MSEC;
2213 cscf->client_header_buffer_size = NGX_CONF_UNSET_SIZE; 2227 cscf->client_header_buffer_size = NGX_CONF_UNSET_SIZE;
2214 cscf->optimize_server_names = NGX_CONF_UNSET; 2228 cscf->optimize_server_names = NGX_CONF_UNSET;
2215 cscf->ignore_invalid_headers = NGX_CONF_UNSET; 2229 cscf->ignore_invalid_headers = NGX_CONF_UNSET;
2230 cscf->merge_slashes = NGX_CONF_UNSET;
2216 2231
2217 return cscf; 2232 return cscf;
2218 } 2233 }
2219 2234
2220 2235
2302 ngx_conf_merge_value(conf->optimize_server_names, 2317 ngx_conf_merge_value(conf->optimize_server_names,
2303 prev->optimize_server_names, 1); 2318 prev->optimize_server_names, 1);
2304 2319
2305 ngx_conf_merge_value(conf->ignore_invalid_headers, 2320 ngx_conf_merge_value(conf->ignore_invalid_headers,
2306 prev->ignore_invalid_headers, 1); 2321 prev->ignore_invalid_headers, 1);
2322
2323 ngx_conf_merge_value(conf->merge_slashes, prev->merge_slashes, 1);
2307 2324
2308 return NGX_CONF_OK; 2325 return NGX_CONF_OK;
2309 } 2326 }
2310 2327
2311 2328
2358 lcf->port_in_redirect = NGX_CONF_UNSET; 2375 lcf->port_in_redirect = NGX_CONF_UNSET;
2359 lcf->msie_padding = NGX_CONF_UNSET; 2376 lcf->msie_padding = NGX_CONF_UNSET;
2360 lcf->msie_refresh = NGX_CONF_UNSET; 2377 lcf->msie_refresh = NGX_CONF_UNSET;
2361 lcf->log_not_found = NGX_CONF_UNSET; 2378 lcf->log_not_found = NGX_CONF_UNSET;
2362 lcf->recursive_error_pages = NGX_CONF_UNSET; 2379 lcf->recursive_error_pages = NGX_CONF_UNSET;
2380 lcf->server_tokens = NGX_CONF_UNSET;
2363 lcf->types_hash_max_size = NGX_CONF_UNSET_UINT; 2381 lcf->types_hash_max_size = NGX_CONF_UNSET_UINT;
2364 lcf->types_hash_bucket_size = NGX_CONF_UNSET_UINT; 2382 lcf->types_hash_bucket_size = NGX_CONF_UNSET_UINT;
2365 2383
2366 return lcf; 2384 return lcf;
2367 } 2385 }
2542 ngx_conf_merge_value(conf->msie_padding, prev->msie_padding, 1); 2560 ngx_conf_merge_value(conf->msie_padding, prev->msie_padding, 1);
2543 ngx_conf_merge_value(conf->msie_refresh, prev->msie_refresh, 0); 2561 ngx_conf_merge_value(conf->msie_refresh, prev->msie_refresh, 0);
2544 ngx_conf_merge_value(conf->log_not_found, prev->log_not_found, 1); 2562 ngx_conf_merge_value(conf->log_not_found, prev->log_not_found, 1);
2545 ngx_conf_merge_value(conf->recursive_error_pages, 2563 ngx_conf_merge_value(conf->recursive_error_pages,
2546 prev->recursive_error_pages, 0); 2564 prev->recursive_error_pages, 0);
2565 ngx_conf_merge_value(conf->server_tokens, prev->server_tokens, 1);
2547 2566
2548 if (conf->open_files == NULL) { 2567 if (conf->open_files == NULL) {
2549 conf->open_files = prev->open_files; 2568 conf->open_files = prev->open_files;
2550 } 2569 }
2551 2570
2576 2595
2577 u.url = value[1]; 2596 u.url = value[1];
2578 u.listen = 1; 2597 u.listen = 1;
2579 u.default_port = 80; 2598 u.default_port = 80;
2580 2599
2581 if (ngx_parse_url(cf, &u) != NGX_OK) { 2600 if (ngx_parse_url(cf->pool, &u) != NGX_OK) {
2582 if (u.err) { 2601 if (u.err) {
2583 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, 2602 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
2584 "%s in \"%V\" of the \"listen\" directive", 2603 "%s in \"%V\" of the \"listen\" directive",
2585 u.err, &u.url); 2604 u.err, &u.url);
2586 } 2605 }