void
Log::Format::SquidReferer(AccessLogEntry *al, Logfile *logfile)
{
+ // do not log unless there is something to be displayed
+ if (!al || !al->request)
+ return;
+
const char *referer = al->request->header.getStr(HDR_REFERER);
// do not log unless there is something to be displayed
void
Log::Format::SquidUserAgent(AccessLogEntry * al, Logfile * logfile)
{
+ // do not log unless there is something to be displayed.
+ if (!al || !al->request)
+ return;
+
const char *agent = al->request->header.getStr(HDR_USER_AGENT);
// do not log unless there is something to be displayed.