Disable logging to access.log if filename is an empty string

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2162 152afb58-edef-0310-8abb-c4023f1b3aa9
This commit is contained in:
Stefan Bühler 2008-04-29 20:59:18 +00:00
parent cbdd9e485b
commit f9999e286e
2 changed files with 6 additions and 2 deletions

1
NEWS
View File

@ -23,6 +23,7 @@ NEWS
* Fix mod_magnet to set con->mode = p->id if it generates content, so returning 4xx/5xx doesn't append an error page
* Remove lighttpd.spec* from source, fixing all problems with it ;-)
* Do not rely on PATH_MAX (POSIX does not require it) (#580)
* Disable logging to access.log if filename is an empty string
- 1.4.19 - 2008-03-10

View File

@ -473,7 +473,7 @@ SETDEFAULTS_FUNC(log_access_open) {
continue;
}
if (buffer_is_empty(s->access_logfile)) continue;
if (s->access_logfile->used < 2) continue;
if (s->access_logfile->ptr[0] == '|') {
#ifdef HAVE_FORK
@ -570,7 +570,7 @@ SIGHUP_FUNC(log_access_cycle) {
}
if (s->use_syslog == 0 &&
!buffer_is_empty(s->access_logfile) &&
s->access_logfile->used > 1 &&
s->access_logfile->ptr[0] != '|') {
close(s->log_access_fd);
@ -647,6 +647,9 @@ REQUESTDONE_FUNC(log_access_write) {
mod_accesslog_patch_connection(srv, con, p);
/* No output device, nothing to do */
if (!p->conf.use_syslog && p->conf.log_access_fd == -1) return HANDLER_GO_ON;
b = p->conf.access_logbuffer;
if (b->used == 0) {
buffer_copy_string(b, "");