Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Rewritten resources do not support Content-Range #276

Open
GoogleCodeExporter opened this issue Apr 6, 2015 · 3 comments
Open

Rewritten resources do not support Content-Range #276

GoogleCodeExporter opened this issue Apr 6, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

Apache supports the "Range" header and sends out just the requested bytes for 
resources, we do not do this for rewritten resources.

I don't know if this matters for the comparitively small resources we are 
dealing with. Might be worth noting in docs at least.


$ nc www.modpagespeed.com 80
GET /images/Puzzle.jpg HTTP/1.1                    
Host:www.modpagespeed.com
Range: bytes=500-501

HTTP/1.1 206 Partial Content
Date: Tue, 19 Apr 2011 15:26:13 GMT
Server: Apache/2.2.3 (CentOS)
Last-Modified: Tue, 08 Mar 2011 18:28:32 GMT
Accept-Ranges: bytes
Content-Length: 2
Cache-control: public, max-age=600
Content-Range: bytes 500-501/241260
Content-Type: image/jpeg

<92>|


$ nc www.modpagespeed.com 80
GET /images/Puzzle.jpg.pagespeed.ce.91_WewrLtP.jpg HTTP/1.1
Host:www.modpagespeed.com
Range: bytes=500-501

HTTP/1.1 200 OK
Date: Tue, 19 Apr 2011 15:27:39 GMT
Server: Apache/2.2.3 (CentOS)
Cache-Control: max-age=31536000
Expires: Wed, 18 Apr 2012 15:25:41 GMT
Etag: W/0
Last-Modified: Tue, 19 Apr 2011 15:25:41 GMT
Content-Length: 241260
Content-Type: image/jpeg

<FF><D8><FF>...

Original issue reported on code.google.com by sligocki@google.com on 19 Apr 2011 at 3:34

@GoogleCodeExporter
Copy link
Author

Is this a functional problem, Shawn?  It looks that way.  Should we change to 
'defect'?

Original comment by jmara...@google.com on 24 May 2012 at 7:27

  • Changed state: RequestClarification

@GoogleCodeExporter
Copy link
Author

Nope, it's optional, but encouraged. From 
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.2:

A server MAY ignore the Range header. However, HTTP/1.1 origin servers and 
intermediate caches ought to support byte ranges when possible, since Range 
supports efficient recovery from partially failed transfers, and supports 
efficient partial retrieval of large entities.

Original comment by sligocki@google.com on 24 May 2012 at 7:36

  • Changed state: New

@GoogleCodeExporter
Copy link
Author

Original comment by jmara...@google.com on 24 May 2012 at 7:38

  • Changed state: Accepted

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant