comparison src/http/ngx_http_core_module.c @ 484:ed5e10fb40fc NGINX_0_7_54

nginx 0.7.54 *) Feature: the ngx_http_image_filter_module. *) Feature: the "proxy_ignore_headers" and "fastcgi_ignore_headers" directives. *) Bugfix: a segmentation fault might occur in worker process, if an "open_file_cache_errors off" directive was used; the bug had appeared in 0.7.53. *) Bugfix: the "port_in_redirect off" directive did not work; the bug had appeared in 0.7.39. *) Bugfix: improve handling of "select" method errors. *) Bugfix: of "select() failed (10022: ...)" error in nginx/Windows. *) Bugfix: in error text descriptions in nginx/Windows; the bug had appeared in 0.7.53.
author Igor Sysoev <http://sysoev.ru>
date Fri, 01 May 2009 00:00:00 +0400
parents 392c16f2d858
children 829f9a66a659
comparison
equal deleted inserted replaced
483:0a2f4b42ddad 484:ed5e10fb40fc
1290 r->loc_conf = clcf->limit_except_loc_conf; 1290 r->loc_conf = clcf->limit_except_loc_conf;
1291 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); 1291 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
1292 } 1292 }
1293 1293
1294 if (r == r->main) { 1294 if (r == r->main) {
1295 r->connection->log->file = clcf->err_log->file; 1295 r->connection->log->file = clcf->error_log->file;
1296 1296
1297 if (!(r->connection->log->log_level & NGX_LOG_DEBUG_CONNECTION)) { 1297 if (!(r->connection->log->log_level & NGX_LOG_DEBUG_CONNECTION)) {
1298 r->connection->log->log_level = clcf->err_log->log_level; 1298 r->connection->log->log_level = clcf->error_log->log_level;
1299 } 1299 }
1300 } 1300 }
1301 1301
1302 if ((ngx_io.flags & NGX_IO_SENDFILE) && clcf->sendfile) { 1302 if ((ngx_io.flags & NGX_IO_SENDFILE) && clcf->sendfile) {
1303 r->connection->sendfile = 1; 1303 r->connection->sendfile = 1;
2927 * lcf->root = { 0, NULL }; 2927 * lcf->root = { 0, NULL };
2928 * lcf->limit_except = 0; 2928 * lcf->limit_except = 0;
2929 * lcf->post_action = { 0, NULL }; 2929 * lcf->post_action = { 0, NULL };
2930 * lcf->types = NULL; 2930 * lcf->types = NULL;
2931 * lcf->default_type = { 0, NULL }; 2931 * lcf->default_type = { 0, NULL };
2932 * lcf->err_log = NULL; 2932 * lcf->error_log = NULL;
2933 * lcf->error_pages = NULL; 2933 * lcf->error_pages = NULL;
2934 * lcf->try_files = NULL; 2934 * lcf->try_files = NULL;
2935 * lcf->client_body_path = NULL; 2935 * lcf->client_body_path = NULL;
2936 * lcf->regex = NULL; 2936 * lcf->regex = NULL;
2937 * lcf->exact_match = 0; 2937 * lcf->exact_match = 0;
3107 { 3107 {
3108 return NGX_CONF_ERROR; 3108 return NGX_CONF_ERROR;
3109 } 3109 }
3110 } 3110 }
3111 3111
3112 if (conf->err_log == NULL) { 3112 if (conf->error_log == NULL) {
3113 if (prev->err_log) { 3113 if (prev->error_log) {
3114 conf->err_log = prev->err_log; 3114 conf->error_log = prev->error_log;
3115 } else { 3115 } else {
3116 conf->err_log = cf->cycle->new_log; 3116 conf->error_log = &cf->cycle->new_log;
3117 } 3117 }
3118 } 3118 }
3119 3119
3120 if (conf->error_pages == NULL && prev->error_pages) { 3120 if (conf->error_pages == NULL && prev->error_pages) {
3121 conf->error_pages = prev->error_pages; 3121 conf->error_pages = prev->error_pages;
4102 { 4102 {
4103 ngx_http_core_loc_conf_t *lcf = conf; 4103 ngx_http_core_loc_conf_t *lcf = conf;
4104 4104
4105 ngx_str_t *value; 4105 ngx_str_t *value;
4106 4106
4107 if (lcf->error_log) {
4108 return "is duplicate";
4109 }
4110
4107 value = cf->args->elts; 4111 value = cf->args->elts;
4108 4112
4109 lcf->err_log = ngx_log_create_errlog(cf->cycle, &value[1]); 4113 lcf->error_log = ngx_log_create(cf->cycle, &value[1]);
4110 if (lcf->err_log == NULL) { 4114 if (lcf->error_log == NULL) {
4111 return NGX_CONF_ERROR; 4115 return NGX_CONF_ERROR;
4112 } 4116 }
4113 4117
4114 return ngx_set_error_log_levels(cf, lcf->err_log); 4118 if (cf->args->nelts == 2) {
4119 lcf->error_log->log_level = NGX_LOG_ERR;
4120 return NGX_CONF_OK;
4121 }
4122
4123 return ngx_log_set_levels(cf, lcf->error_log);
4115 } 4124 }
4116 4125
4117 4126
4118 static char * 4127 static char *
4119 ngx_http_core_keepalive(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) 4128 ngx_http_core_keepalive(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)