]> git.pld-linux.org Git - packages/squid.git/commitdiff
- combined log patch adopted for 2.5.STABLE4 version auto/ac/squid-2_5_STABLE4-6
authorsiefca <siefca@pld-linux.org>
Sat, 24 Jan 2004 19:18:20 +0000 (19:18 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- combined log patch fixed for '?' characters in URL (by pawel.misiewicz at akonet . pl)
- combined log patch naming convention invented (name-version-patchname.patch)

Changed files:
    squid-2.5.STABLE4-apache-like-combined-log.patch -> 1.1
    squid.spec -> 1.156

squid-2.5.STABLE4-apache-like-combined-log.patch [new file with mode: 0644]
squid.spec

diff --git a/squid-2.5.STABLE4-apache-like-combined-log.patch b/squid-2.5.STABLE4-apache-like-combined-log.patch
new file mode 100644 (file)
index 0000000..503e5f2
--- /dev/null
@@ -0,0 +1,73 @@
+diff -Nur squid-2.5.STABLE4.orig/src/access_log.c squid-2.5.STABLE4/src/access_log.c
+--- squid-2.5.STABLE4.orig/src/access_log.c    2003-07-28 10:59:28.000000000 +0200
++++ squid-2.5.STABLE4/src/access_log.c 2004-01-24 19:52:12.000000000 +0100
+@@ -268,24 +268,32 @@
+ {
+     const char *client = NULL;
+     char *user1 = NULL, *user2 = NULL;
++    request_t * request = al->request;
++    const HttpHeader *req_hdr = &request->header;
++
+     if (Config.onoff.log_fqdn)
+       client = fqdncache_gethostbyaddr(al->cache.caddr, 0);
+     if (client == NULL)
+       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\"",
+       client,
+-      user2 ? user2 : dash_str,
+-      user1 ? user1 : dash_str,
+-      mkhttpdlogtime(&squid_curtime),
+-      al->private.method_str,
+-      al->url,
+-      al->http.version.major, al->http.version.minor,
+-      al->http.code,
+-      (long int) al->cache.size,
+-      log_tags[al->cache.code],
+-      hier_strings[al->hier.code]);
++       user2 ? user2 : dash_str,
++       user1 ? user1 : dash_str,
++       mkhttpdlogtime(&squid_curtime),
++       al->private.method_str,
++       (al->http_uri ? al->http_uri : al->url),
++       al->http.version.major, al->http.version.minor,
++       al->http.code,
++       (long int) al->cache.size,
++       httpHeaderHas( req_hdr, HDR_REFERER ) ?
++         httpHeaderGetStr( req_hdr, HDR_REFERER ) :
++         dash_str,     // Referer if we have it, else dash_str.
++       httpHeaderHas( req_hdr, HDR_USER_AGENT ) ?
++         httpHeaderGetStr( req_hdr, HDR_USER_AGENT ) :
++         dash_str );   // User-Agent if we have it, else dash_str.
+     safe_free(user1);
+     safe_free(user2);
+ }
+diff -Nur squid-2.5.STABLE4.orig/src/client_side.c squid-2.5.STABLE4/src/client_side.c
+--- squid-2.5.STABLE4.orig/src/client_side.c   2004-01-24 19:11:23.000000000 +0100
++++ squid-2.5.STABLE4/src/client_side.c        2004-01-24 19:58:22.000000000 +0100
+@@ -845,7 +845,9 @@
+           http->al.http.method = request->method;
+           http->al.http.version = request->http_ver;
+           http->al.headers.request = xstrdup(mb.buf);
+-          http->al.hier = request->hier;
++          http->al.hier = request->hier;      /* apache-like combined-log */
++          http->al.request = request;         /* apache-like combined-log */
++          http->al.http_uri = http->uri;      /* apache-like combined-log */
+           if (request->auth_user_request) {
+               if (authenticateUserRequestUsername(request->auth_user_request))
+                   http->al.cache.authuser = xstrdup(authenticateUserRequestUsername(request->auth_user_request));
+diff -Nur squid-2.5.STABLE4.orig/src/structs.h squid-2.5.STABLE4/src/structs.h
+--- squid-2.5.STABLE4.orig/src/structs.h       2004-01-24 19:11:23.000000000 +0100
++++ squid-2.5.STABLE4/src/structs.h    2004-01-24 19:59:56.000000000 +0100
+@@ -1045,6 +1045,8 @@
+     struct {
+       const char *method_str;
+     } private;
++    request_t *request;               /* apache-like combined-log */
++    char *http_uri;           /* apache-like combined-log */
+     HierarchyLogEntry hier;
+ };
index 488a0fa049c73b8f5efb09bb6ee16acd5bdac760..9a21ae66b0e755ab26810f48652db721bbfc1f27 100644 (file)
@@ -11,7 +11,7 @@ Summary(uk):  Squid - 
 Summary(zh_CN):        SQUID ¸ßËÙ»º³å´úÀí·þÎñÆ÷
 Name:          squid
 Version:       2.5.STABLE4
-Release:       5
+Release:       6
 Epoch:         7
 License:       GPL v2
 Group:         Networking/Daemons
@@ -74,7 +74,7 @@ Patch190:     %{name}-newssl.patch
 Patch200:      %{name}-sasl.patch
 Patch210:      http://piorun.ds.pg.gda.pl/~blues/patches/%{name}-more_FD-new.patch
 Patch220:      %{name}-empty-referer.patch
-Patch230:      %{name}-apache-like-combined-log.patch
+Patch230:      %{name}-%{version}-apache-like-combined-log.patch
 URL:           http://www.squid-cache.org/
 BuildRequires: autoconf
 BuildRequires: automake
This page took 0.126317 seconds and 4 git commands to generate.