Re: Failed Redirect

From: Duane Wessels <wessels@dont-contact.us>
Date: Tue, 28 Oct 97 08:05:00 -0800

david@avarice.nepean.uws.edu.au writes:

>878032680.146 104 137.154.210.85 TCP_HIT/302 333 GET
> http://www.microsoft.com/ - NONE/- text/html
>878032680.647 97 137.154.210.85 TCP_HIT/302 339 GET
> http://www.microsoft.com/ie40.asp - NONE/- text/html
>878032681.190 131 137.154.210.85 TCP_HIT/302 333 GET
> http://www.microsoft.com/default.asp - NONE/- text/html
>878032681.666 108 137.154.210.85 TCP_HIT/302 339 GET
> http://www.microsoft.com/ie40.asp - NONE/- text/html
>878032682.240 77 137.154.210.85 TCP_HIT/302 333 GET
> http://www.microsoft.com/default.asp - NONE/- text/html
>[...etc...]
>
>Note, "302" is "Moved Temporarily". Using both Netscape and Lynx results
>in the "cycling redirect". Using Lynx's "-mime_header" option, you get
>(for "http://www.microsoft.com/"):
>
>-----
>HTTP/1.0 302 Object moved
>Server: Microsoft-IIS/3.0
>Date: Tue, 28 Oct 1997 05:56:52 GMT
>Location: /ie40.asp
>Content-type: text/html
>Expires: Tue, 28 Oct 1997 05:56:52 GMT
>Cache-control: private
>-----

Zoinks. We should NOT be getting cache hits on these replies. The
httpProcessReplyHeaders() function has some bugs and really needs to be
redesigned, but this should work as a temporary fix:

Index: http.c
===================================================================
RCS file: /surf1/CVS/squid/src/http.c,v
retrieving revision 1.149.2.15
diff -w -u -r1.149.2.15 http.c
--- http.c 1997/08/07 23:46:24 1.149.2.15
+++ http.c 1997/10/28 16:02:29
@@ -503,7 +503,9 @@
            break;
            /* Responses that only are cacheable if the server says so */
        case 302: /* Moved temporarily */
- if (reply->expires > -1)
+ if (EBIT_TEST(reply->cache_control, SCC_PRIVATE))
+ httpMakePrivate(entry);
+ else if (reply->expires > -1 && reply->expires > reply->date)
                httpMakePublic(entry);
            else
                httpMakePrivate(entry);

Duane W.
Received on Tue Oct 28 1997 - 08:13:12 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:37:21 MST