From 13653be34e1674afd80cd18c55c385151537d0e3 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Mon, 1 Feb 2010 14:04:20 +0000 Subject: merge r3039, r3145: access_log fixes: *) strict testing "access_log off" *) allow to log invalid $request in access_log always, before it was logged only if error_log was set to info or debug level --- src/http/modules/ngx_http_log_module.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/http/modules') diff --git a/src/http/modules/ngx_http_log_module.c b/src/http/modules/ngx_http_log_module.c index 1ff105821..e1d99c05a 100644 --- 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_command_t *cmd, void *conf) 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) { -- cgit