diff -ruN squid-2.5.STABLE1/src/access_log.c squid-2.5.STABLE1-patched/src/access_log.c --- squid-2.5.STABLE1/src/access_log.c 2002-06-16 13:25:40.000000000 +0200 +++ squid-2.5.STABLE1-patched/src/access_log.c 2003-02-11 22:23:52.000000000 +0100 @@ -271,7 +271,7 @@ client = inet_ntoa(al->cache.caddr); user1 = accessLogFormatName(al->cache.authuser); user2 = accessLogFormatName(al->cache.rfc931); - logfilePrintf(logfile, "%s %s %s [%s] \"%s %s HTTP/%d.%d\" %d %ld %s:%s", + logfilePrintf(logfile, "%s %s %s [%s] \"%s %s HTTP/%d.%d\" %d %ld \"%s\" \"%s\" \"%s\" %s:%s", client, user2 ? user2 : dash_str, user1 ? user1 : dash_str, @@ -281,6 +281,9 @@ al->http.version.major, al->http.version.minor, al->http.code, (long int) al->cache.size, + al->http.referer, + al->http.agent, + al->http.cookie, log_tags[al->cache.code], hier_strings[al->hier.code]); safe_free(user1); diff -ruN squid-2.5.STABLE1/src/client_side.c squid-2.5.STABLE1-patched/src/client_side.c --- squid-2.5.STABLE1/src/client_side.c 2002-09-23 06:04:03.000000000 +0200 +++ squid-2.5.STABLE1-patched/src/client_side.c 2003-02-12 22:26:13.000000000 +0100 @@ -772,6 +772,10 @@ ConnStateData *conn = http->conn; StoreEntry *e; request_t *request = http->request; + const HttpHeader *req_hdr = &request->header; + const char *agent; + const char *referer; + const char *cookie; MemObject *mem = NULL; debug(33, 3) ("httpRequestFree: %s\n", storeUrl(http->entry)); if (!clientCheckTransferDone(http)) { @@ -787,7 +791,10 @@ if (http->entry) mem = http->entry->mem_obj; if (http->out.size || http->log_type) { - http->al.icp.opcode = ICP_INVALID; + agent = httpHeaderGetStr(req_hdr, HDR_USER_AGENT); + referer = httpHeaderGetStr(req_hdr, HDR_REFERER); + cookie = httpHeaderGetStr(req_hdr, HDR_COOKIE); + http->al.icp.opcode = ICP_INVALID; http->al.url = http->log_uri; debug(33, 9) ("httpRequestFree: al.url='%s'\n", http->al.url); if (mem) { @@ -798,6 +805,9 @@ http->al.cache.size = http->out.size; http->al.cache.code = http->log_type; http->al.cache.msec = tvSubMsec(http->start, current_time); + http->al.http.agent = agent; + http->al.http.referer = referer; + http->al.http.cookie = cookie; if (request) { Packer p; MemBuf mb; diff -ruN squid-2.5.STABLE1/src/structs.h squid-2.5.STABLE1-patched/src/structs.h --- squid-2.5.STABLE1/src/structs.h 2002-09-08 01:11:23.000000000 +0200 +++ squid-2.5.STABLE1-patched/src/structs.h 2003-02-11 22:05:57.000000000 +0100 @@ -1020,6 +1020,9 @@ int code; const char *content_type; http_version_t version; + const char *agent; + const char *referer; + const char *cookie; } http; struct { icp_opcode opcode;