[nginx] svn commit: r4247 - in branches/stable-1.0: . src/core src/event src/http src/http/modules src/os/unix src/os/win32

igor at sysoev.ru igor at sysoev.ru
Tue Nov 1 13:24:50 UTC 2011


Author: is
Date: 2011-11-01 13:24:50 +0000 (Tue, 01 Nov 2011)
New Revision: 4247

Modified:
   branches/stable-1.0/
   branches/stable-1.0/src/core/ngx_cycle.c
   branches/stable-1.0/src/core/ngx_palloc.c
   branches/stable-1.0/src/core/ngx_string.c
   branches/stable-1.0/src/event/ngx_event.c
   branches/stable-1.0/src/event/ngx_event_timer.c
   branches/stable-1.0/src/http/modules/ngx_http_dav_module.c
   branches/stable-1.0/src/http/modules/ngx_http_headers_filter_module.c
   branches/stable-1.0/src/http/modules/ngx_http_log_module.c
   branches/stable-1.0/src/http/ngx_http.c
   branches/stable-1.0/src/http/ngx_http_core_module.c
   branches/stable-1.0/src/http/ngx_http_upstream.c
   branches/stable-1.0/src/os/unix/ngx_errno.c
   branches/stable-1.0/src/os/unix/ngx_file_aio_read.c
   branches/stable-1.0/src/os/unix/ngx_freebsd_sendfile_chain.c
   branches/stable-1.0/src/os/unix/ngx_process.c
   branches/stable-1.0/src/os/unix/ngx_process_cycle.c
   branches/stable-1.0/src/os/win32/ngx_process_cycle.c
Log:
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 essages.



Property changes on: branches/stable-1.0
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk:3960-3974,3977-3987,3991-3996,3998,4003-4007,4009-4013,4015-4018,4020,4023,4025-4027,4034-4065,4073,4077,4086-4090,4094-4102,4106-4108,4113-4114,4129-4131,4133,4135-4137,4154,4156-4157,4184,4186-4187,4192,4200-4205,4229,4235,4237
   + /trunk:3960-3974,3977-3987,3991-3996,3998,4003-4007,4009-4013,4015-4018,4020,4023,4025-4027,4034-4065,4073,4077,4086-4090,4094-4102,4106-4108,4113-4114,4129-4137,4143,4154,4156-4157,4183-4184,4186-4187,4191-4192,4199-4205,4229,4235,4237

Modified: branches/stable-1.0/src/core/ngx_cycle.c
===================================================================
--- branches/stable-1.0/src/core/ngx_cycle.c	2011-11-01 13:00:30 UTC (rev 4246)
+++ branches/stable-1.0/src/core/ngx_cycle.c	2011-11-01 13:24:50 UTC (rev 4247)
@@ -739,7 +739,7 @@
         ngx_temp_pool = ngx_create_pool(128, cycle->log);
         if (ngx_temp_pool == NULL) {
             ngx_log_error(NGX_LOG_EMERG, cycle->log, 0,
-                          "can not create ngx_temp_pool");
+                          "could not create ngx_temp_pool");
             exit(1);
         }
 

Modified: branches/stable-1.0/src/core/ngx_palloc.c
===================================================================
--- branches/stable-1.0/src/core/ngx_palloc.c	2011-11-01 13:00:30 UTC (rev 4246)
+++ branches/stable-1.0/src/core/ngx_palloc.c	2011-11-01 13:24:50 UTC (rev 4247)
@@ -68,7 +68,7 @@
 
     /*
      * we could allocate the pool->log from this pool
-     * so we can not use this log while the free()ing the pool
+     * so we cannot use this log while free()ing the pool
      */
 
     for (p = pool, n = pool->d.next; /* void */; p = n, n = n->d.next) {

Modified: branches/stable-1.0/src/core/ngx_string.c
===================================================================
--- branches/stable-1.0/src/core/ngx_string.c	2011-11-01 13:00:30 UTC (rev 4246)
+++ branches/stable-1.0/src/core/ngx_string.c	2011-11-01 13:24:50 UTC (rev 4247)
@@ -381,7 +381,7 @@
 
                     /*
                      * (int64_t) cast is required for msvc6:
-                     * it can not convert uint64_t to double
+                     * it cannot convert uint64_t to double
                      */
                     ui64 = (uint64_t) ((f - (int64_t) ui64) * scale + 0.5);
 

Modified: branches/stable-1.0/src/event/ngx_event.c
===================================================================
--- branches/stable-1.0/src/event/ngx_event.c	2011-11-01 13:00:30 UTC (rev 4246)
+++ branches/stable-1.0/src/event/ngx_event.c	2011-11-01 13:24:50 UTC (rev 4247)
@@ -1027,7 +1027,7 @@
                                "when the server runs without a master process "
                                "the \"%V\" event type must be the same as "
                                "in previous configuration - \"%s\" "
-                               "and it can not be changed on the fly, "
+                               "and it cannot be changed on the fly, "
                                "to change it you need to stop server "
                                "and start it again",
                                &value[1], old_ecf->name);

Modified: branches/stable-1.0/src/event/ngx_event_timer.c
===================================================================
--- branches/stable-1.0/src/event/ngx_event_timer.c	2011-11-01 13:00:30 UTC (rev 4246)
+++ branches/stable-1.0/src/event/ngx_event_timer.c	2011-11-01 13:24:50 UTC (rev 4247)
@@ -103,11 +103,11 @@
             if (ngx_threaded && ngx_trylock(ev->lock) == 0) {
 
                 /*
-                 * We can not change the timer of the event that is been
-                 * handling by another thread.  And we can not easy walk
-                 * the rbtree to find a next expired timer so we exit the loop.
-                 * However it should be rare case when the event that is
-                 * been handling has expired timer.
+                 * We cannot change the timer of the event that is being
+                 * handled by another thread.  And we cannot easy walk
+                 * the rbtree to find next expired timer so we exit the loop.
+                 * However, it should be a rare case when the event that is
+                 * being handled has an expired timer.
                  */
 
                 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, ev->log, 0,

Modified: branches/stable-1.0/src/http/modules/ngx_http_dav_module.c
===================================================================
--- branches/stable-1.0/src/http/modules/ngx_http_dav_module.c	2011-11-01 13:00:30 UTC (rev 4246)
+++ branches/stable-1.0/src/http/modules/ngx_http_dav_module.c	2011-11-01 13:24:50 UTC (rev 4247)
@@ -158,7 +158,7 @@
 
         if (r->uri.data[r->uri.len - 1] == '/') {
             ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
-                          "can not PUT to a collection");
+                          "cannot PUT to a collection");
             return NGX_HTTP_CONFLICT;
         }
 

Modified: branches/stable-1.0/src/http/modules/ngx_http_headers_filter_module.c
===================================================================
--- branches/stable-1.0/src/http/modules/ngx_http_headers_filter_module.c	2011-11-01 13:00:30 UTC (rev 4246)
+++ branches/stable-1.0/src/http/modules/ngx_http_headers_filter_module.c	2011-11-01 13:24:50 UTC (rev 4247)
@@ -507,7 +507,7 @@
         minus = 0;
 
         if (hcf->expires == NGX_HTTP_EXPIRES_MODIFIED) {
-            return "daily time can not be used with \"modified\" parameter";
+            return "daily time cannot be used with \"modified\" parameter";
         }
 
         hcf->expires = NGX_HTTP_EXPIRES_DAILY;

Modified: branches/stable-1.0/src/http/modules/ngx_http_log_module.c
===================================================================
--- branches/stable-1.0/src/http/modules/ngx_http_log_module.c	2011-11-01 13:00:30 UTC (rev 4246)
+++ branches/stable-1.0/src/http/modules/ngx_http_log_module.c	2011-11-01 13:24:50 UTC (rev 4247)
@@ -960,7 +960,7 @@
 
         if (log->script) {
             ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
-                               "buffered logs can not have variables in name");
+                               "buffered logs cannot have variables in name");
             return NGX_CONF_ERROR;
         }
 

Modified: branches/stable-1.0/src/http/ngx_http.c
===================================================================
--- branches/stable-1.0/src/http/ngx_http.c	2011-11-01 13:00:30 UTC (rev 4246)
+++ branches/stable-1.0/src/http/ngx_http.c	2011-11-01 13:24:50 UTC (rev 4247)
@@ -1226,7 +1226,7 @@
 #endif
 
     /*
-     * we can not compare whole sockaddr struct's as kernel
+     * we cannot compare whole sockaddr struct's as kernel
      * may fill some fields in inherited sockaddr struct's
      */
 
@@ -1281,7 +1281,7 @@
 
             if (addr[i].opt.set) {
                 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
-                        "a duplicate listen options for %s", addr[i].opt.addr);
+                        "duplicate listen options for %s", addr[i].opt.addr);
                 return NGX_ERROR;
             }
 

Modified: branches/stable-1.0/src/http/ngx_http_core_module.c
===================================================================
--- branches/stable-1.0/src/http/ngx_http_core_module.c	2011-11-01 13:00:30 UTC (rev 4246)
+++ branches/stable-1.0/src/http/ngx_http_core_module.c	2011-11-01 13:24:50 UTC (rev 4247)
@@ -1259,7 +1259,7 @@
         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 @@
 
     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 @@
     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 @@
 
         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 @@
 
         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 @@
 
         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 @@
 #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 @@
                 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 @@
     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 @@
                               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 @@
         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 @@
             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_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 @@
 
         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 @@
         }
 #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 @@
         } 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 @@
 
     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_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_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 @@
 
     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;
     }
 

Modified: branches/stable-1.0/src/http/ngx_http_upstream.c
===================================================================
--- branches/stable-1.0/src/http/ngx_http_upstream.c	2011-11-01 13:00:30 UTC (rev 4246)
+++ branches/stable-1.0/src/http/ngx_http_upstream.c	2011-11-01 13:24:50 UTC (rev 4247)
@@ -987,7 +987,7 @@
 
         if (!u->cacheable && u->peer.connection) {
             ngx_log_error(NGX_LOG_INFO, ev->log, ev->kq_errno,
-                          "kevent() reported that client closed prematurely "
+                          "kevent() reported that client prematurely closed "
                           "connection, so upstream connection is closed too");
             ngx_http_upstream_finalize_request(r, u,
                                                NGX_HTTP_CLIENT_CLOSED_REQUEST);
@@ -995,8 +995,8 @@
         }
 
         ngx_log_error(NGX_LOG_INFO, ev->log, ev->kq_errno,
-                      "kevent() reported that client closed "
-                      "prematurely connection");
+                      "kevent() reported that client prematurely closed "
+                      "connection");
 
         if (u->peer.connection == NULL) {
             ngx_http_upstream_finalize_request(r, u,
@@ -1050,7 +1050,7 @@
 
     if (!u->cacheable && u->peer.connection) {
         ngx_log_error(NGX_LOG_INFO, ev->log, err,
-                      "client closed prematurely connection, "
+                      "client prematurely closed connection, "
                       "so upstream connection is closed too");
         ngx_http_upstream_finalize_request(r, u,
                                            NGX_HTTP_CLIENT_CLOSED_REQUEST);
@@ -1058,7 +1058,7 @@
     }
 
     ngx_log_error(NGX_LOG_INFO, ev->log, err,
-                  "client closed prematurely connection");
+                  "client prematurely closed connection");
 
     if (u->peer.connection == NULL) {
         ngx_http_upstream_finalize_request(r, u,

Modified: branches/stable-1.0/src/os/unix/ngx_errno.c
===================================================================
--- branches/stable-1.0/src/os/unix/ngx_errno.c	2011-11-01 13:00:30 UTC (rev 4246)
+++ branches/stable-1.0/src/os/unix/ngx_errno.c	2011-11-01 13:24:50 UTC (rev 4247)
@@ -12,7 +12,7 @@
  * The strerror() messages are copied because:
  *
  * 1) strerror() and strerror_r() functions are not Async-Signal-Safe,
- *    therefore, they can not be used in signal handlers;
+ *    therefore, they cannot be used in signal handlers;
  *
  * 2) a direct sys_errlist[] array may be used instead of these functions,
  *    but Linux linker warns about its usage:

Modified: branches/stable-1.0/src/os/unix/ngx_file_aio_read.c
===================================================================
--- branches/stable-1.0/src/os/unix/ngx_file_aio_read.c	2011-11-01 13:00:30 UTC (rev 4246)
+++ branches/stable-1.0/src/os/unix/ngx_file_aio_read.c	2011-11-01 13:24:50 UTC (rev 4247)
@@ -23,7 +23,7 @@
  *    kqueue EVFILT_AIO filter is level triggered only: an event repeats
  *    until aio_return() will be called;
  *
- *    aio_cancel() can not cancel file AIO: it returns AIO_NOTCANCELED always.
+ *    aio_cancel() cannot cancel file AIO: it returns AIO_NOTCANCELED always.
  */
 
 

Modified: branches/stable-1.0/src/os/unix/ngx_freebsd_sendfile_chain.c
===================================================================
--- branches/stable-1.0/src/os/unix/ngx_freebsd_sendfile_chain.c	2011-11-01 13:00:30 UTC (rev 4246)
+++ branches/stable-1.0/src/os/unix/ngx_freebsd_sendfile_chain.c	2011-11-01 13:24:50 UTC (rev 4247)
@@ -11,7 +11,7 @@
 
 /*
  * Although FreeBSD sendfile() allows to pass a header and a trailer,
- * it can not send a header with a part of the file in one packet until
+ * it cannot send a header with a part of the file in one packet until
  * FreeBSD 5.3.  Besides, over the fast ethernet connection sendfile()
  * may send the partially filled packets, i.e. the 8 file pages may be sent
  * as the 11 full 1460-bytes packets, then one incomplete 324-bytes packet,

Modified: branches/stable-1.0/src/os/unix/ngx_process.c
===================================================================
--- branches/stable-1.0/src/os/unix/ngx_process.c	2011-11-01 13:00:30 UTC (rev 4246)
+++ branches/stable-1.0/src/os/unix/ngx_process.c	2011-11-01 13:24:50 UTC (rev 4247)
@@ -541,7 +541,7 @@
         if (WEXITSTATUS(status) == 2 && ngx_processes[i].respawn) {
             ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, 0,
                           "%s %P exited with fatal code %d "
-                          "and can not be respawn",
+                          "and cannot be respawned",
                           process, pid, WEXITSTATUS(status));
             ngx_processes[i].respawn = 0;
         }

Modified: branches/stable-1.0/src/os/unix/ngx_process_cycle.c
===================================================================
--- branches/stable-1.0/src/os/unix/ngx_process_cycle.c	2011-11-01 13:00:30 UTC (rev 4246)
+++ branches/stable-1.0/src/os/unix/ngx_process_cycle.c	2011-11-01 13:24:50 UTC (rev 4247)
@@ -620,7 +620,8 @@
                     == NGX_INVALID_PID)
                 {
                     ngx_log_error(NGX_LOG_ALERT, cycle->log, 0,
-                                  "can not respawn %s", ngx_processes[i].name);
+                                  "could not respawn %s",
+                                  ngx_processes[i].name);
                     continue;
                 }
 

Modified: branches/stable-1.0/src/os/win32/ngx_process_cycle.c
===================================================================
--- branches/stable-1.0/src/os/win32/ngx_process_cycle.c	2011-11-01 13:00:30 UTC (rev 4246)
+++ branches/stable-1.0/src/os/win32/ngx_process_cycle.c	2011-11-01 13:24:50 UTC (rev 4247)
@@ -530,7 +530,7 @@
                 == NGX_INVALID_PID)
             {
                 ngx_log_error(NGX_LOG_ALERT, cycle->log, 0,
-                              "can not respawn %s", ngx_processes[n].name);
+                              "could not respawn %s", ngx_processes[n].name);
 
                 if (n == ngx_last_process - 1) {
                     ngx_last_process--;



More information about the nginx-devel mailing list