[Varnish] #704: Incorrect Range support for the last n bytes

Varnish varnish-bugs at varnish-cache.org
Thu May 20 19:15:26 CEST 2010


#704: Incorrect Range support for the last n bytes
-------------------+--------------------------------------------------------
 Reporter:  luc    |        Type:  defect
   Status:  new    |    Priority:  normal
Milestone:         |   Component:  build 
  Version:  trunk  |    Severity:  normal
 Keywords:         |  
-------------------+--------------------------------------------------------
 According to the spec
 http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.1,

 {{{
       - The final 500 bytes (byte offsets 9500-9999, inclusive):
         bytes=-500
 }}}

 But varnish return the first n characters, because low is set to 0.
 {{{
 curl -s -v -H 'Host: s1.s-sfr.fr' http://93.17.156.118/js/pontis.js -H
 'Range: bytes=-1'
 > GET /js/pontis.js HTTP/1.1
 > User-Agent: curl/7.20.0 (i486-pc-linux-gnu)
 > Accept: */*
 > Host: s1.s-sfr.fr
 > Range: bytes=-1
 >
 < HTTP/1.1 206 Partial Content
 < Server: Apache-Coyote/www1
 < Last-Modified: Mon, 19 Apr 2010 13:15:23 GMT
 < Content-Type: text/javascript
 < Via: 1.1 www.s-sfr.fr
 < Cache-Control: public
 < Expires: Thu, 20 May 2010 17:50:49 GMT
 < Vary: Accept-Encoding
 < Via: http1
 < Accept-Ranges: bytes
 < Date: Thu, 20 May 2010 15:50:49 GMT
 < X-Varnish: 2115996372
 < Age: 0
 < Via: 1.1 varnish
 < Connection: keep-alive
 < Content-Range: bytes 0-1/10629
 < Content-Length: 2
 }}}

 This patch try to fix it, and must by apply after the #702

-- 
Ticket URL: <http://varnish-cache.org/ticket/704>
Varnish <http://varnish-cache.org/>
The Varnish HTTP Accelerator




More information about the varnish-bugs mailing list