Bug 1319705

Summary: Squid send wrong respond for GET-request following Range-GET request
Product: Red Hat Enterprise Linux 6 Reporter: Gennadii Altukhov <galtukho>
Component: squidAssignee: Luboš Uhliarik <luhliari>
Status: CLOSED ERRATA QA Contact: Martin Frodl <mfrodl>
Severity: high Docs Contact:
Priority: urgent    
Version: 6.7CC: bnater, dyordano, galtukho, hartsjc, ovasik, rdrazny, salmy, taw, thozza, tlestach
Target Milestone: rcKeywords: Regression, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: squid-3.1.23-16.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1322709 1336387 1405411 (view as bug list) Environment:
Last Closed: 2016-05-11 00:21:23 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:
Bug Depends On:    
Bug Blocks: 1322709    
Attachments:
Description Flags
Squid config none

Description Gennadii Altukhov 2016-03-21 11:12:57 UTC
Created attachment 1138536 [details]
Squid config

Description of problem:

For a squid I have option 'range_offset_limit -1 KB' in a config file. That means squid should download a whole file even if Range-GET request was sent to it. I send Range-GET request and then usual GET request for the same file.

For Range-GET squid responds:
< X-Cache: MISS from dhcp131-219.brq.redhat.com
< X-Cache-Lookup: NONE from dhcp131-219.brq.redhat.com:8080

for usual GET request for the same file, following the first request, sometimes(!), squid responds:
< X-Cache: MISS from dhcp131-219.brq.redhat.com
< X-Cache-Lookup: HIT from dhcp131-219.brq.redhat.com:8080

but should be two HIT.
 
Version-Release number of selected component (if applicable):
3.1.23-9.el6

How reproducible:
not always.

Steps to Reproduce:
1. Install squid version of 3.1.23-9.el6 on RHEL 6
2. Change config file. (see attachment)
1. perform GET request:
curl -v --proxy 127.0.0.1:8080 --get \
	-H 'Host: mirror.centos.org' \
	-H 'X-RHN-EffectiveURI: /centos-6/6.7/os/x86_64/Packages/kernel-2.6.32-573.el6.x86_64.rpm' \
	-H 'X-RHN-IP-Path: 10.34.131.106' \
	-H 'X-RHN-ActualURI: /centos-6/6.7/os/x86_64/Packages/kernel-2.6.32-573.el6.x86_64.rpm' \
	-H 'X-RHN-Transport-Capability: follow-redirects=3' \
	-H 'X-RHN-Proxy-Version: 5.5.0'	\
	-H 'Connection: close' \
	-H 'Accept-Encoding: identity' \
	-H 'Range: bytes=440-996355' \
	-H 'X-RHN-Proxy-Auth: 1000169392::1458299566.02:21600.0:QQ683WMfTjynMIIvA9zImC5lAEczNFjwsKBkdK4yUgk=:dhcp131-19.brq.redhat.com' \
	-A 'urlgrabber/3.1.0 yum/3.2.22' \
	'http://mirror.centos.org/centos-6/6.7/os/x86_64/Packages/kernel-2.6.32-573.el6.x86_64.rpm' > ./kernel.rpm.header
2.
curl -v --proxy 127.0.0.1:8080 --get \
	-H 'Host: mirror.centos.org' \
	-H 'X-RHN-EffectiveURI: /centos-6/6.7/os/x86_64/Packages/kernel-2.6.32-573.el6.x86_64.rpm' \
	-H 'X-RHN-IP-Path: 10.34.131.106' \
	-H 'X-RHN-ActualURI: /centos-6/6.7/os/x86_64/Packages/kernel-2.6.32-573.el6.x86_64.rpm' \
	-H 'X-RHN-Transport-Capability: follow-redirects=3' \
	-H 'X-RHN-Proxy-Version: 5.5.0'	\
	-H 'Connection: close' \
	-H 'Accept-Encoding: identity' \
	-H 'X-RHN-Proxy-Auth: 1000169392::1458299566.02:21600.0:QQ683WMfTjynMIIvA9zImC5lAEczNFjwsKBkdK4yUgk=:dhcp131-19.brq.redhat.com' \
	-A 'urlgrabber/3.1.0 yum/3.2.22' \
	'http://mirror.centos.org/centos-6/6.7/os/x86_64/Packages/kernel-2.6.32-573.el6.x86_64.rpm' > ./kernel.rpm

Actual results:
Wrong header

Expected results:
Correct header

Additional info:

RHN/Satellite Proxy works wrong with a new version of squid 3.1.23-9.el6 (see Bug 1302072), but correct with the previous 3.1.10-29.el6.
After some investigation, I see that only difference between two versions is HTTP-header in respond.

Comment 19 errata-xmlrpc 2016-05-11 00:21:23 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/RHBA-2016-0896.html