Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2008-06-30 16:27:24 +0400
committerIgor Sysoev <igor@sysoev.ru>2008-06-30 16:27:24 +0400
commitb882154636c92aede2b682e4ae10c324d8d5cf35 (patch)
tree96584e26e066e6bcc32953cf76b8e6bda3f188a3 /src/core/ngx_open_file_cache.c
parentc3584fec61fff2275bae50f336908f5dbec8264e (diff)
variables in access_log
Diffstat (limited to 'src/core/ngx_open_file_cache.c')
-rw-r--r--src/core/ngx_open_file_cache.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/core/ngx_open_file_cache.c b/src/core/ngx_open_file_cache.c
index bf8f0de12..704d0ab79 100644
--- a/src/core/ngx_open_file_cache.c
+++ b/src/core/ngx_open_file_cache.c
@@ -460,7 +460,14 @@ ngx_open_and_stat_file(u_char *name, ngx_open_file_info_t *of, ngx_log_t *log)
}
}
- fd = ngx_open_file(name, NGX_FILE_RDONLY, NGX_FILE_OPEN, 0);
+ if (!of->log) {
+ fd = ngx_open_file(name, NGX_FILE_RDONLY, NGX_FILE_OPEN, 0);
+
+ } else {
+ fd = ngx_open_file(name, NGX_FILE_RDWR,
+ NGX_FILE_CREATE_OR_OPEN|NGX_FILE_APPEND,
+ NGX_FILE_DEFAULT_ACCESS);
+ }
if (fd == NGX_INVALID_FILE) {
goto failed;