Hi,
I noticed that www/jesred, as in ports, does not work with Squid anymore.
I'm using OpenBSD 4.2, but 4.1 had the same problem.

The problem is in the new format that Squid 2.6 uses to talk to the
url_rewriter, adding the "urlgroup" parameter that jesred does not expect.

This little patch I wrote makes it functional again, but I didn't read all
the sources to make all the changes required by this new parameter.

HTH,
D.

ps. Please CC me as I'm not subscribed.

----8<--- www/jesred/patches/patch-rewrite.c -----8<----
--- rewrite.c.orig      Sat Aug 15 02:01:15 1998
+++ rewrite.c   Tue Nov  6 12:35:08 2007
@@ -60,7 +60,8 @@
     int c, i;
     struct in_addr address;
     char *token, *new_token;
-    char *end[4];
+    char *end[5];
+    char *urlgroup;

     c = 0;
     token = strchr(buff,' ');
@@ -81,17 +82,24 @@
                *token = '\0';
                end[2] = token;
                *ident = new_token;
-               new_token = strchr(++token,'\n');
+               new_token = strchr(++token,' ');
                if (new_token) {
                    c++;
                    *new_token = '\0';
                    end[3] = new_token;
                    *method = token;
+                   token = strchr(++new_token,'\n');
+                   if (token) {        /* UrlGroup */
+                       c++;
+                       *token = '\0';
+                       end[4] = token;
+                       urlgroup = new_token;
+                   }
                }
            }
        }
     }
-    if(c != 4) {
+    if(c != 5) {
        for(i = 0; i < c; i++) {
            if ( end[i] )
                *end[i] = ' ';
@@ -100,7 +108,7 @@
        return 1;
     }
 #ifdef DEBUG
-    log(DEBG, "Request: %s %s %s %s\n", *url, *src_addr, *ident, *method);
+    log(DEBG, "Request: %s %s %s %s %s\n", *url, *src_addr, *ident,
*method, urlgroup);
 #endif

     /* all methods must be GET or ICP_QUERY */
@@ -111,7 +119,7 @@
        c++;
     if ( c ) {
 #ifdef DEBUG
-       for(c = 0; c < 4; c++) {
+       for(c = 0; c < 5; c++) {
            if ( end[c] )
                *end[c] = ' ';
        }
-----8<------------

Reply via email to