]> git.kaiwu.me - nginx.git/commitdiff
Merge of r4270, r4274:
authorMaxim Dounin <mdounin@mdounin.ru>
Wed, 14 Dec 2011 14:31:55 +0000 (14:31 +0000)
committerMaxim Dounin <mdounin@mdounin.ru>
Wed, 14 Dec 2011 14:31:55 +0000 (14:31 +0000)
Minor cleanup:

*) Changed error message to be more appropriate in the imaginary
   "open_file_cache max=0" case.

*) Fixed NGX_CONF_TAKE1/NGX_CONF_FLAG misuse.

src/http/modules/ngx_http_fastcgi_module.c
src/http/modules/ngx_http_ssi_filter_module.c
src/http/modules/ngx_http_ssl_module.c
src/http/ngx_http_core_module.c
src/mail/ngx_mail_proxy_module.c

index 48e238cbe79e2da52b45b9e052b1edd75009e4be..48c24bae6a4bece4a834645a1606f582020f7574 100644 (file)
@@ -431,7 +431,7 @@ static ngx_command_t  ngx_http_fastcgi_commands[] = {
       &ngx_http_upstream_ignore_headers_masks },
 
     { ngx_string("fastcgi_catch_stderr"),
-      NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,
+      NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
       ngx_conf_set_str_array_slot,
       NGX_HTTP_LOC_CONF_OFFSET,
       offsetof(ngx_http_fastcgi_loc_conf_t, catch_stderr),
index 75a7156efc8fbc38e7cb79aef52159f8d1708549..0b8bc9bf83a735ab6f1ed3820fe952d7b22a8884 100644 (file)
@@ -139,14 +139,14 @@ static ngx_command_t  ngx_http_ssi_filter_commands[] = {
       NULL },
 
     { ngx_string("ssi_min_file_chunk"),
-      NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,
+      NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
       ngx_conf_set_size_slot,
       NGX_HTTP_LOC_CONF_OFFSET,
       offsetof(ngx_http_ssi_loc_conf_t, min_file_chunk),
       NULL },
 
     { ngx_string("ssi_value_length"),
-      NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,
+      NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
       ngx_conf_set_size_slot,
       NGX_HTTP_LOC_CONF_OFFSET,
       offsetof(ngx_http_ssi_loc_conf_t, value_len),
index f1f6a4ae4c84da317a153dd032b990fda33ad1a1..0ac744ca1e2cf512e56621fadaad6c4f66daf024 100644 (file)
@@ -101,7 +101,7 @@ static ngx_command_t  ngx_http_ssl_commands[] = {
       NULL },
 
     { ngx_string("ssl_verify_client"),
-      NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_FLAG,
+      NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1,
       ngx_conf_set_enum_slot,
       NGX_HTTP_SRV_CONF_OFFSET,
       offsetof(ngx_http_ssl_srv_conf_t, verify),
index 0739c0044e01561bf81850a1a71e7d04a7d20888..c1fab30923cec5b6f5fb15f254d1d1c275b7c012 100644 (file)
@@ -4397,7 +4397,7 @@ ngx_http_core_open_file_cache(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
         if (ngx_strncmp(value[i].data, "max=", 4) == 0) {
 
             max = ngx_atoi(value[i].data + 4, value[i].len - 4);
-            if (max == NGX_ERROR) {
+            if (max <= 0) {
                 goto failed;
             }
 
index a7c4b7e48b63d5693f1b1554559b48aa0211bc9b..298e8d96a862f3e7394fdcd438c6d691b6c6aa8d 100644 (file)
@@ -60,7 +60,7 @@ static ngx_command_t  ngx_mail_proxy_commands[] = {
       NULL },
 
     { ngx_string("proxy_pass_error_message"),
-      NGX_MAIL_MAIN_CONF|NGX_MAIL_SRV_CONF|NGX_CONF_TAKE1,
+      NGX_MAIL_MAIN_CONF|NGX_MAIL_SRV_CONF|NGX_CONF_FLAG,
       ngx_conf_set_flag_slot,
       NGX_MAIL_SRV_CONF_OFFSET,
       offsetof(ngx_mail_proxy_conf_t, pass_error_message),