changeset 3038:cd8738e76610

strict testing "access_log off"
author Igor Sysoev <igor@sysoev.ru>
date Sun, 23 Aug 2009 17:06:33 +0000
parents 0278f13b04c5
children 9ecfcc5c5fb2
files src/http/modules/ngx_http_log_module.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/modules/ngx_http_log_module.c
+++ b/src/http/modules/ngx_http_log_module.c
@@ -837,7 +837,13 @@ ngx_http_log_set_log(ngx_conf_t *cf, ngx
 
     if (ngx_strcmp(value[1].data, "off") == 0) {
         llcf->off = 1;
-        return NGX_CONF_OK;
+        if (cf->args->nelts == 2) {
+            return NGX_CONF_OK;
+        }
+
+        ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
+                           "invalid parameter \"%V\"", &value[2]);
+        return NGX_CONF_ERROR;
     }
 
     if (llcf->logs == NULL) {