Bug 847056

Summary: squid incorrectly marks elements as stale when the client uses If-Modified-Since and If-None-Match headers
Product: Red Hat Enterprise Linux 6 Reporter: Felix Dewaleyne <fdewaley>
Component: squidAssignee: Michal Luscon <mluscon>
Status: CLOSED ERRATA QA Contact: Zbysek MRAZ <zmraz>
Severity: high Docs Contact:
Priority: high    
Version: 6.3CC: dapospis, ebenes, jskala, ovasik, plyons
Target Milestone: rcKeywords: Patch, ZStream
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 08:40:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 855330    

Description Felix Dewaleyne 2012-08-09 14:47:40 UTC
Description of problem:
squid incorrectly marks elements as stale when the client uses If-Modified-Since or If-None-Match headers

Version-Release number of selected component (if applicable):
squid-3.1.10-1.el6_2.4.x86_64 

How reproducible:
all the time

Steps to Reproduce:
1.setup an apache server with default configuration
2.setup a squid with a remote proxy (sample configuration attached)
3.setup a client to go through the proxy
4.make a request through the proxy using If-Modified-Since or If-None-Match in the headers
  
Actual results:
returns from squid include
Warning: 110 squid/3.1.10 "Response is stale"
Warning: 111 squid/3.1.10 "Revalidation failed"

Expected results:
The elements are not marked as stale.

Additional info:

here is a sample test  with firefox(obscured the hostnames, customer data present in support case)
GET /js/swfobject.js HTTP/1.1
Host: XXXXXXXX
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.6) Gecko/20120717 Firefox/10.0.6
Accept: */*
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Referer: http://XXXXXXXXX/XXX/XXXXX/
Cookie: __utma=219222153.1615965469.1344327824.1344327824.1344327824.1; __utmb=219222153; __utmc=219222153; __utmz=219222153.1344327824.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none); Snoop_testi=1; Snoobisession_XXXXX_net=170017; Snoobi30minute_XXXXX_net=170017; SnoobiID=770371611; WRUID=0; JSESSIONID=C6029A1BD02E5C780F6863750E01A2DB
If-Modified-Since: Thu, 16 Sep 2010 07:33:48 GMT
If-None-Match: W/"17952-1284622428000"
Cache-Control: max-age=0

Response:

HTTP/1.0 304 Not Modified
Date: Tue, 07 Aug 2012 08:25:03 GMT
ETag: W/"17952-1284622428000"
Expires: Tue, 07 Aug 2012 08:40:03 GMT
Cache-Control: max-age=900
Warning: 110 squid/3.1.10 "Response is stale"
Warning: 111 squid/3.1.10 "Revalidation failed"
X-Cache: HIT from cache01.srv.ambientia.fi
X-Cache-Lookup: HIT from not.squid.redhat.com:80
Via: 1.0 cache01.srv.ambientia.fi (squid/3.1.10)
Connection: keep-alive

Comment 8 Felix Dewaleyne 2012-08-15 09:32:12 UTC
the description is actually an expected behaviour as of http/1.1 : max-age:0 is expected to cause these warnings.

looking into further traces, I also have

GET /pics/merkki_musta.gif HTTP/1.1
Host: www.XXX.net
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.6) Gecko/20120717 Firefox/10.0.6
Accept: image/png,image/*;q=0.8,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Referer: http://www.XXX.net/style/new.css
Cookie: JSESSIONID=9986CBBB9E6BDCFE97F63C1EBAFD55FE; __utma=219222153.1023426781.1343845504.1343845504.1343845504.1; __utmb=219222153; __utmc=219222153; __utmz=219222153.1343845504.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none); Snoop_testi=1

HTTP/1.0 200 OK
Last-Modified: Fri, 12 Nov 2010 12:08:56 GMT
Content-Type: image/gif
Content-Length: 49
Date: Wed, 01 Aug 2012 18:25:03 GMT
ETag: W/"49-1289563736000"
Expires: Wed, 01 Aug 2012 18:40:03 GMT
Cache-Control: max-age=900
Warning: 110 squid/3.1.10 "Response is stale"
Warning: 111 squid/3.1.10 "Revalidation failed"
X-Cache: HIT from cache01.srv.XXX.fi
X-Cache-Lookup: HIT from cache01.srv.XXX.fi:80
Via: 1.0 cache01.srv.XXX.fi (squid/3.1.10)
Connection: keep-alive

no etag mentioned in the request though.

Comment 22 errata-xmlrpc 2013-02-21 08:40:01 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2013-0505.html