r26306 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r26305‎ | r26306 | r26307 >
Date:10:31, 2 October 2007
Author:emil
Status:old
Tags:
Comment:
* fixed memory leak
Modified paths:
  • /branches/wikia/google-analytics/squid-ga.patch (modified) (history)

Diff [purge]

Index: branches/wikia/google-analytics/squid-ga.patch
@@ -1,6 +1,6 @@
2 -+++ squid-2.6.STABLE14/src/http.c 2007-09-05 15:41:14.000000000 +0000
3 -@@ -387,14 +387,48 @@
 2+--- src/http.c.orig 2007-09-26 15:42:22.000000000 +0000
 3+@@ -387,14 +387,49 @@
44 }
55 strListAdd(&vstr, name, ',');
66 hdr = httpHeaderGetByName(&request->header, name);
@@ -24,7 +24,7 @@
2525 + if (strListGetItem(&cookieitem, '=', &cookiename, &cookienamelen, &cookienamepos)) {
2626 + char *cn = xmalloc(cookienamelen + 1);
2727 + xstrncpy(cn, cookiename, cookienamelen + 1);
28 -+ if (strcmp(cn, "__utma") && strcmp(cn, "__utmb") && strcmp(cn, "__utmc") && strcmp(cn, "__utmv") && strcmp(cn, "__utmz")) {
 28++ if (strncmp(cn, "__utm", 5)) {
2929 + stringAppend(&newhdr, strBuf(cookieitem), strlen(strBuf(cookieitem)));
3030 + debug(11,3) ("cookie accepted = {%s}\n", cn);
3131 + } else {
@@ -43,6 +43,7 @@
4444 + stringAppend(&vstr, value, strlen(value));
4545 + stringAppend(&vstr, "\"", 1);
4646 + }
 47++ stringClean(&newhdr);
4748 + } else {
4849 + value = rfc1738_escape_part(value);
4950 + stringAppend(&vstr, "=\"", 2);
@@ -54,7 +55,7 @@
5556 stringClean(&hdr);
5657 }
5758 safe_free(request->vary_hdr);
58 -@@ -403,7 +437,8 @@
 59+@@ -403,7 +438,8 @@
5960 request->vary_hdr = xstrdup(strBuf(vary));
6061 request->vary_headers = xstrdup(strBuf(vstr));
6162 }

Status & tagging log