tor 2012-01-12 klockan 16:30 -0700 skrev Alex Rousskov:

> >         /* Add max-age only without no-cache */
> >         if (!EBIT_TEST(cc->mask, CC_MAX_AGE) && !EBIT_TEST(cc->mask, 
> > CC_NO_CACHE)) {
> >             const char *url =
> >                 entry ? entry->url() : urlCanonical(orig_request);
> >             httpHdrCcSetMaxAge(cc, getMaxAge(url));
> > 
> >             if (request->urlpath.size())
> >                 assert(strstr(url, request->urlpath.termedBuf()));
> >         }
> 
> 
> I remember that I could not understand what that assertion is checking
> and, especially, why a URL-related check is located inside a
> Cache-Control: max-age clause.

You are free to nuke it if you like.

>From what it looks it's an old debug/development check that slipped in
with another unrelated commit in the early days of Squid, The line is
from http.c 1.171 (wessels 18-Jun-97).

It triggers if the URL used by refresh.cc max-age calculation do not
match the requested URL. But if that happens then we have bigger
problems than adding the wrong max-age condition.

Regards
Henrik

Reply via email to