Revision: 7064
http://sourceforge.net/p/ipcop/svn/7064
Author: dotzball
Date: 2013-06-08 15:37:41 +0000 (Sat, 08 Jun 2013)
Log Message:
-----------
We have to remember the raw original URL as the URL is modified for testing
purpose. So the exisiting HTML entities like %3F (?), %26 (&), %3D (=) etc. are
changed
which brakes the URL for further processing if it is send to stdout like we do
it for the
redirector chain.
For example the Google sponsored links were broken before/without this patch.
Modified Paths:
--------------
ipcop/trunk/src/patches/squidGuard-1.5-beta_stdout-always.patch
Modified: ipcop/trunk/src/patches/squidGuard-1.5-beta_stdout-always.patch
===================================================================
--- ipcop/trunk/src/patches/squidGuard-1.5-beta_stdout-always.patch
2013-06-08 14:44:22 UTC (rev 7063)
+++ ipcop/trunk/src/patches/squidGuard-1.5-beta_stdout-always.patch
2013-06-08 15:37:41 UTC (rev 7064)
@@ -1,7 +1,12 @@
-original input to stdout, to be useable with multiple redirectors
+Original input to stdout, to be useable with multiple redirectors
when option -f is given on squidGuard start
+We have to remember the raw original URL as the URL is modified for testing
+purpose. So the exisiting HTML entities like %3F (?), %26 (&), %3D (=) etc.
are changed
+which brakes the URL for further processing if it is send to stdout like we do
it for the
+redirector chain (THIS patch).
+diff -Nur a/src/main.c.in b/src/main.c.in
--- a/src/main.c.in 2009-09-27 21:41:50.000000000 +0200
-+++ b/src/main.c.in 2012-02-25 21:13:20.000000000 +0100
++++ b/src/main.c.in 2013-06-01 21:18:55.000000000 +0200
@@ -59,6 +59,7 @@
char **globalEnvp ;
int globalDebugTimeDelta = 0;
@@ -32,7 +37,7 @@
if(src == NULL || src->cont_search == 0){
- puts("");
+ if (globalFullStdout) {
-+ fprintf(stdout, "%s %s/%s %s %s\n", squidInfo.orig,
squidInfo.src, squidInfo.srcDomain, squidInfo.ident, squidInfo.method);
++ fprintf(stdout, "%s %s/%s %s %s\n", squidInfo.origraw,
squidInfo.src, squidInfo.srcDomain, squidInfo.ident, squidInfo.method);
+ }
+ else {
+ puts("");
@@ -48,3 +53,26 @@
break;
}
} else {
+diff -Nur a/src/sgDiv.c.in b/src/sgDiv.c.in
+--- a/src/sgDiv.c.in 2010-09-08 13:57:18.000000000 +0200
++++ b/src/sgDiv.c.in 2013-06-03 21:43:02.000000000 +0200
+@@ -100,6 +100,8 @@
+
+ field = strtok(line,"\t ");
+ /*field holds each fetched url*/
++ /* remember real raw url in case everything is ok an we want to stdout it */
++ strcpy(s->origraw,field);
+ /* Let's first decode the url and then test it. Fixes bug2. */
+ HTUnEscape(field);
+
+diff -Nur a/src/sg.h.in b/src/sg.h.in
+--- a/src/sg.h.in 2010-09-08 13:57:18.000000000 +0200
++++ b/src/sg.h.in 2013-05-31 13:00:50.000000000 +0200
+@@ -164,6 +164,7 @@
+ int dot; /* true if domain is in dot notation */
+ char url[MAX_BUF];
+ char orig[MAX_BUF];
++ char origraw[MAX_BUF];
+ char surl[MAX_BUF];
+ char furl[MAX_BUF];
+ char *strippedurl;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Ipcop-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ipcop-svn