[Varnish] #1777: Range requests problem
Varnish
varnish-bugs at varnish-cache.org
Fri Aug 14 14:33:04 CEST 2015
#1777: Range requests problem
-----------------------+----------------------
Reporter: llavaud | Type: defect
Status: new | Priority: normal
Milestone: | Component: varnishd
Version: 4.1.0-TP1 | Severity: normal
Keywords: range |
-----------------------+----------------------
Hello,
I use Varnish 4.1.0-TP1 on debian wheezy.
I have a strange problem with range requests, i request a page of the
following size:
{{{
curl 'http://my_host/my_uri' --silent --write-out
'size_download=%{size_download}\n' --output /dev/null
size_download=32876
}}}
Now if i request the url with a range lower than the 32876 bytes (page
size), example:
{{{
curl -i -H 'Range: bytes=0-32875' http://my_host/my_uri
HTTP/1.1 206 Partial Content
Date: Fri, 14 Aug 2015 12:14:37 GMT
Set-Cookie:
eZSESSIDac08b8c73ea29869f9b619cab686aebb=efcsqrs288hr30733qs18u29t4;
expires=Sat, 15-Aug-2015 12:14:38 GMT; path=/
Set-Cookie: e1_provider=europe1; path=/; domain=.europe1.fr
Vary: Accept-Encoding
X-Server: webdynphp54-06
Content-Type: text/html; charset=UTF-8
X-Varnish-Hostname: webcache24
Age: 3
X-S-Maxage: 60
Cache-Control: max-age=120, public
Accept-Ranges: bytes
Content-Range: bytes 0-32875/*
Content-Length: 32876
Connection: keep-alive
}}}
curl end normaly and i got a 206 response from varnish, everything is ok
Now if i request with a range set to 32876, varnish response seem ok:
{{{
curl -i -H 'Range: bytes=0-32875' http://my_host/my_uri
HTTP/1.1 206 Partial Content
Date: Fri, 14 Aug 2015 12:11:22 GMT
Set-Cookie:
eZSESSIDac08b8c73ea29869f9b619cab686aebb=kobb2cu9789ghsf1rqjpb7tcq7;
expires=Sat, 15-Aug-2015 12:11:22 GMT; path=/
Set-Cookie: e1_provider=europe1; path=/; domain=.europe1.fr
Vary: Accept-Encoding
X-Server: webdynphp54-06
Content-Type: text/html; charset=UTF-8
X-Varnish-Hostname: webcache24
Age: 658
X-S-Maxage: 60
Cache-Control: max-age=120, public
Accept-Ranges: bytes
Content-Range: bytes 0-32876/*
Content-Length: 32877
Connection: keep-alive
}}}
but curl end with the following error:
{{{
curl: (18) transfer closed with 1 bytes remaining to read
}}}
This bug is problematic because most of crawler (Facebook, Google, ...)
request page with a Range header and if the requested Range is greater
than the page size, the crawler got a connection error.
Thanks in advance for your help.
--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1777>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list