------------------------------------------------------------ revno: 13810 revision-id: squid3@treenet.co.nz-20150426164536-2ok6tyj5k28uoslm parent: squid3@treenet.co.nz-20150426164423-2iwgwahs3suyv9t6 committer: Amos Jeffries branch nick: 3.5 timestamp: Sun 2015-04-26 09:45:36 -0700 message: Fix 'access_log none' to prevent following logs being used The documented behaviour of "access_log none" for preventing logging using log lines following the directive has not been working in Squid-3 for some time. Since the 'none' type does not have a log module associated the entire switch logic where its abort is checked for was being skipped. ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20150426164536-2ok6tyj5k28uoslm # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.5 # testament_sha1: f33cf1c1ed851fb8659f06789640b4946566b131 # timestamp: 2015-04-26 16:48:39 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.5 # base_revision_id: squid3@treenet.co.nz-20150426164423-\ # 2iwgwahs3suyv9t6 # # Begin patch === modified file 'src/log/access_log.cc' --- src/log/access_log.cc 2015-01-13 09:13:49 +0000 +++ src/log/access_log.cc 2015-04-26 16:45:36 +0000 @@ -96,6 +96,10 @@ if (log->aclList && checklist && checklist->fastCheck(log->aclList) != ACCESS_ALLOWED) continue; + // The special-case "none" type has no logfile object set + if (log->type == Log::Format::CLF_NONE) + return; + if (log->logfile) { logfileLineStart(log->logfile); @@ -131,9 +135,6 @@ break; #endif - case Log::Format::CLF_NONE: - return; // abort! - default: fatalf("Unknown log format %d\n", log->type); break;