[Varnish] #1506: Make better use of Content-Length information: Avoid chunked responses, more control over Range handling
Varnish
varnish-bugs at varnish-cache.org
Wed Feb 25 12:34:46 CET 2015
#1506: Make better use of Content-Length information: Avoid chunked responses,
more control over Range handling
--------------------------+----------------------------------
Reporter: DonMacAskill | Owner: phk
Type: defect | Status: reopened
Priority: normal | Milestone: Varnish 4.0 release
Component: varnishd | Version: 4.0.0
Severity: critical | Resolution:
Keywords: |
--------------------------+----------------------------------
Comment (by Moshe L):
Hi,
I was tracked on this bug and wait for fix. after upgrade to the last
version (4.0.3) I can see strange problems when streaming video/audio
using varnish.
I am using HTML5 audio/video player.
IE/ WMP first requesting normal HTTP GET, return the correct body with
corect C-L. when I skip in the video, IE was requtest an 206 request, that
varnish responds correctly with correct C-L and range.
Chrome, otherwise, work diffrently:
{{{
GET filename.mp4 HTTP/1.1
Host: host.host.host
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
Accept-Encoding: identity;q=1, *;q=0
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/40.0.2214.111 Safari/537.36
Accept: */*
Referer:
Accept-Language: he-IL,he;q=0.8,en-US;q=0.6,en;q=0.4
Range: bytes=0-
}}}
on the first stage (when file not cached) I see this response:
{{{
HTTP/1.1 416 Requested Range Not Satisfiable
Date: Wed, 25 Feb 2015 11:20:26 GMT
Content-Type: audio/mpeg3
Last-Modified: Fri, 11 Oct 2013 04:02:42 GMT
X-Varnish: 140096817
Age: 0
Via: 1.1 varnish-v4
}}}
Chrome requested again the same request (compared byte-by-byte) 0.5s
after, the file was in the cache and all works.
sometimes the problem is other: the first request (after 5-13 seconds)
returned a wrong C-L range, so Chrome think that the file is 3-4 sec
length and store this wrong info in the cache, stays "forever".
log attached.
--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1506#comment:14>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list