Re: [squid-users] If-Modified-Since - Mozilla/Galeon/etc...

From: Alberto Mesas Navarro <amesas@dont-contact.us>
Date: 13 Feb 2003 09:46:04 +0100

1045079723.076 74 212.80.177.2 TCP_REFRESH_MISS/200 2462 GET
http://desarrollo.host.com/test2.php - DIRECT/192.172.77.130 text/html
[Host: desarrollo.host.com:8080\r\nUser-Agent: Mozilla/5.0 (X11; U;
Linux i686; en-US; rv:1.3b) Gecko/20030130\r\nAccept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1\r\nAccept-Language: es\r\nAccept-Encoding: gzip, deflate, compress;q=0.9\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nKeep-Alive: 300\r\nConnection: keep-alive\r\n] [HTTP/1.1 200 OK\r\nDate: Wed, 12 Feb 2003 19:55:23 GMT\r\nServer: Apache/1.3.27 (Unix) PHP/4.2.3\r\nX-Powered-By: PHP/4.2.3\r\nExpires: Wed, 12 Feb 2003 19:57:23 GMT\r\nLast-Modified: Tue, 04 Feb 2003 10:44:54 GMT\r\nCache-Control: max-age=0\r\nConnection: close\r\nContent-Type: text/html\r\n\r]

1045079741.762 5 212.80.177.2 TCP_REFRESH_MISS/200 411 GET
http://desarrollo.host.com/test2.php - DIRECT/192.172.77.130 text/html
[Host: desarrollo.host.com:8080\r\nUser-Agent: Mozilla/5.0 (X11; U;
Linux i686; en-US; rv:1.3b) Gecko/20030130\r\nAccept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1\r\nAccept-Language: es\r\nAccept-Encoding: gzip, deflate, compress;q=0.9\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nKeep-Alive: 300\r\nConnection: keep-alive\r\nIf-Modified-Since: Tue, 04 Feb 2003 10:44:54 GMT\r\nCache-Control: max-age=0\r\n] [HTTP/1.1 200 OK\r\nDate: Wed, 12 Feb
2003 19:55:41 GMT\r\nServer: Apache/1.3.27 (Unix)
PHP/4.2.3\r\nX-Powered-By: PHP/4.2.3\r\nExpires: Wed, 12 Feb 2003
19:57:41 GMT\r\nLast-Modified: Wed, 12 Feb 2003 19:55:40
GMT\r\nCache-Control: max-age=0\r\nConnection: close\r\nContent-Type:
text/html\r\n\r]

As you can see in the second "log line" I have a Last-Modified header,
that validates If-Modified-Since and overrides my max-age, is there any
way to force squid to ignore If-Modified-Since petitions from
webbrowsers?

Any idea on how to solve this?

If I get a few petitions at a time from mozilla based browsers all of
them get throught squid and php scripts are executed and my CPU DB
servers die.

P.S.: Once again sorry for my lame english.

El mié, 12 de 02 de 2003 a las 18:59, Henrik Nordstrom escribió:
> Please enabele log_mime_hdrs in the native Squid log format and then
> send two requests
>
> 1. The initial TCP_MISS/200 which should have caused the response to get
> cached.
>
> 2. The second TCP_MISS/200 from Mozilla which you thing should have been
> a cache hit..
>
>
> Regards
> Henrik
>
>
> ons 2003-02-12 klockan 16.11 skrev Alberto Mesas Navarro:
> > Hi, first of all thnx in advance for your help and sorry for my lame
> > english :)
> >
> >
> > I have an squid running in front of some apache servers.
> > The mission of the squid server is just to save some CPU usage to my
> > database servers, apache is serving php files that send the next
> > headers:
> >
> > header("Expires: " . $exp_gmt);
> > header("Last-Modified: " . $mod_gmt);
> > header("Cache-Control: public");
> > header("Cache-Control: max-age=" . $this->allowcache_expire * 60);
> >
> > All works ok for Internet Explorer, if I set a cache time of 120
> > seconds, I get the same page for 120 seconds, but if I request the page
> > from a Mozilla based browser I always get a refreshed page.
> >
> > I have seen that Mozilla send a If-Modified-Since header, and I think
> > that's the cause, how can I prevent Squid to refresh the page until the
> > desired time has passed?
> >
> > Thnx

-- 
Alberto Mesas Navarro <amesas@prisacom.com>
Received on Thu Feb 13 2003 - 01:47:13 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:13:22 MST