Quoting Adrian Chadd <[EMAIL PROTECTED]>:

I've got tproxy + squid-2.7 here and I noticed that some stuff wasn't
being cached after I unsubtly made the content cachable.

The problem is "repaired" here:

Index: forward.c
===================================================================
RCS file: /cvsroot/squid/squid/src/forward.c,v
retrieving revision 1.131
diff -u -r1.131 forward.c
--- forward.c   5 Sep 2007 20:03:08 -0000       1.131
+++ forward.c   20 Jan 2008 06:47:17 -0000
@@ -712,7 +712,7 @@
      * peer, then don't cache, and use the IP that the client's DNS lookup
      * returned
      */
- if (fwdState->request->flags.transparent && fwdState->n_tries && (NULL == fs->peer)) { + if (fwdState->request->flags.transparent && (fwdState->n_tries > 1) && (NULL == fs->peer)) {
        storeRelease(fwdState->entry);
commConnectStart(fd, host, port, fwdConnectDone, fwdState, &fwdState->request->my_addr);
     } else {

The problem is that n_tries is always going to be 1 at this point, even before
it attempts a new connection, and stuff is just suddenly uncachable.

Am I on the right track?

The patch looks good to me.

Steven

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


Reply via email to