[Varnish] #1172: Varnish sends inconsistent Vary to downstream caches
Varnish
varnish-bugs at varnish-cache.org
Wed Jul 18 23:56:33 CEST 2012
#1172: Varnish sends inconsistent Vary to downstream caches
--------------------+--------------------
Reporter: RuddO | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: build | Version: 3.0.2
Severity: normal | Resolution:
Keywords: |
--------------------+--------------------
Comment (by RuddO):
I have discovered this is related to the hit for pass feature.
This is an example of a request that gets routed to miss after hash:
/etc/varnish@… 𝛀: echo "GET /search_form HTTP/1.1 Host: declinefm.com
" | nc localhost 80 | head -20
HTTP/1.1 200 OK Server: Zope/(2.13.13, python 2.6.7, linux2) ZServer/1.1
Content-Language: en Expires: Sat, 1 Jan 2000 00:00:00 GMT Vary: Accept-
Encoding Content-Type: text/html;charset=utf-8 Transfer-Encoding: chunked
Date: Wed, 18 Jul 2012 21:50:06 GMT X-Varnish: 13272803 Age: 0 Via: 1.1
varnish Connection: keep-alive
Note the Vary header there.
Almost immediately after that, I produce another request. This, of course,
goes straight to pass since the TTL of the previous fetch was 0 seconds,
and so varnish registered a hit for pass for this object.
0 <- echo "GET /search_form HTTP/1.1 Host: declinefm.com
" | nc localhost 80 | head -20 /etc/varnish@… 𝛀: echo "GET /search_form
HTTP/1.1 Host: declinefm.com
" | nc localhost 80 | head -20
HTTP/1.1 200 OK Server: Zope/(2.13.13, python 2.6.7, linux2) ZServer/1.1
Expires: Sat, 1 Jan 2000 00:00:00 GMT Content-Type:
text/html;charset=utf-8 Content-Language: en Transfer-Encoding: chunked
Date: Wed, 18 Jul 2012 21:50:37 GMT X-Varnish: 13272824 Age: 0 Via: 1.1
varnish Connection: keep-alive
Note the absence of the Vary header here.
I verified my backend and it has correct, consistent behavior.
This appears to be a legitimate varnish bug.
--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1172#comment:2>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list