From: Eduard Bagdasaryan Date: Fri, 22 Jul 2016 19:37:12 +0000 (+1200) Subject: Fix some failed transactions not being logged. X-Git-Tag: SQUID_4_0_13~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da6dbcd110f7603f6d4cd9b3eef749311293fe77;p=thirdparty%2Fsquid.git Fix some failed transactions not being logged. There are situations when Squid logs nothing to access.log after an [abnormal] transaction termination. Such "stealthy" transactions may be a security risk and an accounting problem. ClientHttpRequest is responsible for logging most transactions but that object is created only after the HTTP request headers are successfully parsed. Request header parsing errors may be detected and logged appropriately, but the job handling the incoming transaction may terminate for reasons outside the parsing code control (e.g., a job- killing exception thrown when there are no request headers to start parsing yet or when the job waits for more request headers to finishing parsing). This change adds access logging for three cases: 1. accept(2) system call errors (before ConnStateData job is created). 2. Unexpected ConnStateData job termination, when there is no ClientHttpRequest to log the failure. 3. Connections which send no bytes: these connections drain Squid resources and, hence, should be logged. TODO: make this behavior configurable because some browsers are known to routinely create such connections(and, hence, logging them may create too much noise in some environments). --- diff --git a/doc/release-notes/release-4.sgml b/doc/release-notes/release-4.sgml index 167eaf7297..088264ebb6 100644 --- a/doc/release-notes/release-4.sgml +++ b/doc/release-notes/release-4.sgml @@ -226,6 +226,12 @@ This section gives a thorough account of those changes in three categories: Changes to existing tags