Browse Source

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
svn/tags/lighttpd-1.4.20
Stefan Bühler 14 years ago
parent
commit
f9999e286e
  1. 1
      NEWS
  2. 7
      src/mod_accesslog.c

1
NEWS

@ -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

7
src/mod_accesslog.c

@ -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, "");

Loading…
Cancel
Save