Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1161600

Summary: Squid does not serve cached responses with Vary headers
Product: Red Hat Enterprise Linux 7 Reporter: Nils Breunese <nils>
Component: squidAssignee: Luboš Uhliarik <luhliari>
Status: CLOSED ERRATA QA Contact: Ondřej Pták <optak>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: isenfeld, optak, thozza
Target Milestone: rcKeywords: Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: squid-3.3.8-15.el7 Doc Type: Bug Fix
Doc Text:
Cause: Previously, Squid didn't serve cached object, if server's response contained VARY header. Consequence: Squid didn't use cache. Fix: Bug was fixed. Result: Squid is now serving cached objects, even if server's response contains VARY header.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-19 12:20:27 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:
Attachments:
Description Flags
Patch fixing this bug none

Description Nils Breunese 2014-11-07 13:07:10 UTC
Description of problem:

When objects retrieved from web server return with a Vary header, all requests are always logged as a MISS.

Version-Release number of selected component (if applicable):

squid-3.3.8-12.el7_0.x86_64

See http://bugs.squid-cache.org/show_bug.cgi?id=3806 for upstream bug report and fix (included in upstream Squid 3.3.12).

Comment 2 Luboš Uhliarik 2015-04-22 12:26:34 UTC
(In reply to Nils Breunese from comment #0)
> Description of problem:
> 
> When objects retrieved from web server return with a Vary header, all
> requests are always logged as a MISS.
> 
> Version-Release number of selected component (if applicable):
> 
> squid-3.3.8-12.el7_0.x86_64
> 
> See http://bugs.squid-cache.org/show_bug.cgi?id=3806 for upstream bug report
> and fix (included in upstream Squid 3.3.12).

Hi Nils,

I tried to reproduce this bug on my laptop:. I tried several times to download txt file with which webserver is sending Vary header in this way: 

# my squid is running on VM with IP 192.168.122.120
$ http_proxy=http://192.168.122.120:8080/ wget -O /dev/null -S http://www.ietf.org/rfc/rfc3280.txt

In access.log file I had this:

1429699953.761   1060 192.168.122.1 TCP_MISS/200 296764 GET http://www.ietf.org/rfc/rfc3280.txt - HIER_DIRECT/104.20.0.85 text/plain
1429700057.740   1607 192.168.122.1 TCP_MISS/200 296750 GET http://www.ietf.org/rfc/rfc3280.txt - HIER_DIRECT/104.20.1.85 text/plain
1429700060.228    688 192.168.122.1 TCP_MISS/200 296759 GET http://www.ietf.org/rfc/rfc3280.txt - HIER_DIRECT/104.20.1.85 text/plain

After backporting patch, which you have proposed (http://bugs.squid-cache.org/show_bug.cgi?id=3806), I'm not getting TCP_MISS, so bug is fixed.

access.log after applying patch:

1429705109.494   1082 192.168.122.1 TCP_MISS/200 296836 GET http://www.ietf.org/rfc/rfc3280.txt - HIER_DIRECT/104.20.0.85 text/plain
1429705110.876     16 192.168.122.1 TCP_MEM_HIT/200 296607 GET http://www.ietf.org/rfc/rfc3280.txt - HIER_NONE/- text/plain
1429705113.691     15 192.168.122.1 TCP_MEM_HIT/200 296607 GET http://www.ietf.org/rfc/rfc3280.txt - HIER_NONE/- text/plain

Comment 3 Luboš Uhliarik 2015-04-22 12:27:24 UTC
Created attachment 1017404 [details]
Patch fixing this bug

Comment 9 errata-xmlrpc 2015-11-19 12:20:27 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.

https://rhn.redhat.com/errata/RHSA-2015-2378.html