Mercurial > hg > nginx
diff src/http/ngx_http_core_module.c @ 4246:d3568507db51 stable-1.0
Merging r4132, r4134, r4143, r4183, r4191, r4199:
Various fixes related to error messages:
*) Removed old warning that suggested to use "server_name_in_redirect off"
(now the default) in place of no longer supported "server_name *".
*) Fixing directive name in error message if types hash size is not enough.
*) Replaced "can not" with "cannot" and "could not" in a bunch of places.
Fixed nearby grammar errors.
*) Overhauled error messages.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 01 Nov 2011 13:24:50 +0000 |
parents | 6afb20bf2ad5 |
children | b79dbadb3d5e |
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -1259,7 +1259,7 @@ ngx_http_core_try_files_phase(ngx_http_r tf++; ngx_log_debug3(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, - "try to use %s: \"%s\" \"%s\"", + "trying to use %s: \"%s\" \"%s\"", test_dir ? "dir" : "file", name, path.data); if (tf->lengths == NULL && tf->name.len == 0) { @@ -1897,7 +1897,7 @@ ngx_http_map_uri_to_path(ngx_http_reques if (alias && !r->valid_location) { ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0, - "\"alias\" could not be used in location \"%V\" " + "\"alias\" cannot be used in location \"%V\" " "where URI was rewritten", &clcf->name); return NULL; } @@ -2468,7 +2468,7 @@ ngx_http_internal_redirect(ngx_http_requ if (r->uri_changes == 0) { ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, "rewrite or internal redirection cycle " - "while internal redirect to \"%V\"", uri); + "while internally redirecting to \"%V\"", uri); r->main->count++; ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); @@ -2862,7 +2862,7 @@ ngx_http_core_location(ngx_conf_t *cf, n if (pclcf->exact_match) { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, - "location \"%V\" could not be inside " + "location \"%V\" cannot be inside " "the exact location \"%V\"", &clcf->name, &pclcf->name); return NGX_CONF_ERROR; @@ -2870,7 +2870,7 @@ ngx_http_core_location(ngx_conf_t *cf, n if (pclcf->named) { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, - "location \"%V\" could not be inside " + "location \"%V\" cannot be inside " "the named location \"%V\"", &clcf->name, &pclcf->name); return NGX_CONF_ERROR; @@ -2878,8 +2878,8 @@ ngx_http_core_location(ngx_conf_t *cf, n if (clcf->named) { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, - "named location \"%V\" must be " - "on server level only", + "named location \"%V\" can be " + "on the server level only", &clcf->name); return NGX_CONF_ERROR; } @@ -2948,7 +2948,7 @@ ngx_http_core_regex_location(ngx_conf_t #else ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, - "the using of the regex \"%V\" requires PCRE library", + "using regex \"%V\" requires PCRE library", regex); return NGX_ERROR; @@ -3030,9 +3030,9 @@ ngx_http_core_type(ngx_conf_t *cf, ngx_c type[n].value = content_type; ngx_conf_log_error(NGX_LOG_WARN, cf, 0, - "duplicate extention \"%V\", " + "duplicate extension \"%V\", " "content type: \"%V\", " - "old content type: \"%V\"", + "previous content type: \"%V\"", &value[i], content_type, old); goto next; } @@ -3187,7 +3187,7 @@ ngx_http_core_merge_srv_conf(ngx_conf_t if (conf->large_client_header_buffers.size < conf->connection_pool_size) { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "the \"large_client_header_buffers\" size must be " - "equal to or bigger than \"connection_pool_size\""); + "equal to or greater than \"connection_pool_size\""); return NGX_CONF_ERROR; } @@ -3200,7 +3200,7 @@ ngx_http_core_merge_srv_conf(ngx_conf_t prev->underscores_in_headers, 0); if (conf->server_names.nelts == 0) { - /* the array has 4 empty preallocated elements, so push can not fail */ + /* the array has 4 empty preallocated elements, so push cannot fail */ sn = ngx_array_push(&conf->server_names); #if (NGX_PCRE) sn->regex = NULL; @@ -3435,7 +3435,7 @@ ngx_http_core_merge_loc_conf(ngx_conf_t types_hash.key = ngx_hash_key_lc; types_hash.max_size = conf->types_hash_max_size; types_hash.bucket_size = conf->types_hash_bucket_size; - types_hash.name = "mime_types_hash"; + types_hash.name = "types_hash"; types_hash.pool = cf->pool; types_hash.temp_pool = NULL; @@ -3789,7 +3789,7 @@ ngx_http_core_listen(ngx_conf_t *cf, ngx continue; #else ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, - "bind ipv6only is not supported " + "ipv6only is not supported " "on this platform"); return NGX_CONF_ERROR; #endif @@ -3808,7 +3808,7 @@ ngx_http_core_listen(ngx_conf_t *cf, ngx } ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, - "the invalid \"%V\" parameter", &value[n]); + "invalid parameter \"%V\"", &value[n]); return NGX_CONF_ERROR; } @@ -3846,17 +3846,10 @@ ngx_http_core_server_name(ngx_conf_t *cf if (ngx_strchr(value[i].data, '/')) { ngx_conf_log_error(NGX_LOG_WARN, cf, 0, - "server name \"%V\" has strange symbols", + "server name \"%V\" has suspicious symbols", &value[i]); } - if (value[i].len == 1 && ch == '*') { - ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, - "\"server_name *\" is unsupported, use " - "\"server_name_in_redirect off\" instead"); - return NGX_CONF_ERROR; - } - sn = ngx_array_push(&cscf->server_names); if (sn == NULL) { return NGX_CONF_ERROR; @@ -3917,7 +3910,7 @@ ngx_http_core_server_name(ngx_conf_t *cf } #else ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, - "the using of the regex \"%V\" " + "using regex \"%V\" " "requires PCRE library", &value[i]); return NGX_CONF_ERROR; @@ -3949,7 +3942,7 @@ ngx_http_core_root(ngx_conf_t *cf, ngx_c } else { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "\"%V\" directive is duplicate, " - "\"%s\" directive is specified before", + "\"%s\" directive was specified earlier", &cmd->name, clcf->alias ? "alias" : "root"); } @@ -3958,8 +3951,8 @@ ngx_http_core_root(ngx_conf_t *cf, ngx_c if (clcf->named && alias) { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, - "the \"alias\" directive may not be used " - "inside named location"); + "the \"alias\" directive cannot be used " + "inside the named location"); return NGX_CONF_ERROR; } @@ -3970,7 +3963,7 @@ ngx_http_core_root(ngx_conf_t *cf, ngx_c || ngx_strstr(value[1].data, "${document_root}")) { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, - "the $document_root variable may not be used " + "the $document_root variable cannot be used " "in the \"%V\" directive", &cmd->name); @@ -3981,7 +3974,7 @@ ngx_http_core_root(ngx_conf_t *cf, ngx_c || ngx_strstr(value[1].data, "${realpath_root}")) { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, - "the $realpath_root variable may not be used " + "the $realpath_root variable cannot be used " "in the \"%V\" directive", &cmd->name); @@ -4440,7 +4433,7 @@ ngx_http_core_open_file_cache(ngx_conf_t if (max == 0) { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, - "\"open_file_cache\" must have \"max\" parameter"); + "\"open_file_cache\" must have the \"max\" parameter"); return NGX_CONF_ERROR; }