You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Alan Jenkins <so...@googlemail.com> on 2010/01/22 17:40:51 UTC

[users@httpd] Incorrect response to range request past end of file

Hi

I noticed that "wget -c" chokes on already completed downloads.  It 
retries indefinitely - because it doesn't like the response Apache sends.

RFC 2616 suggests apache SHOULD return "416 Requested Range Not 
Satisfiable" in this case.  Instead, Apache returns "206 Partial 
content" with  a Content-Length of 0.  That's arguably legal -- but then 
it says "Content-Range: bytes */9597", which is not legal for a 206 
response.  "bytes *" means "invalid range", and is only allowed for a 416.

Is this a known bug, or should I report it to Bugzilla?

Thanks
Alan


References: <http://tools.ietf.org/html/rfc2616#section-14.16>


Steps to reproduce:

1. Download a page e.g."wget http://httpd.apache.org/"

 -> index.html is successfully downloaded

2. Try re-downloading it with e.g. "wget -S -c http://httpd.apache.org/"

 -> wget fails, retrying indefinitely:

--2010-01-22 15:56:17-- http://httpd.apache.org/
Resolving localhost... 127.0.0.1, ::1
Connecting to localhost|127.0.0.1|:8123... connected.
Proxy request sent, awaiting response...
HTTP/1.1 206 Partial content
Content-Length: 0
Content-Range: bytes */9597
ETag: "d12b7b-257d-47d6a579d5dbc"
Date: Fri, 22 Jan 2010 15:56:15 GMT
Last-Modified: Mon, 18 Jan 2010 06:19:56 GMT
Server: Apache/2.3.5 (Unix) mod_ssl/2.3.5 OpenSSL/0.9.7d mod_fcgid/2.3.2-dev
Accept-Ranges: bytes
Vary: Accept-Encoding
Content-Type: text/html
Age: 1
Connection: close
Retrying.
...

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Incorrect response to range request past end of file

Posted by Alan Jenkins <so...@googlemail.com>.
> --2010-01-22 15:56:17-- http://httpd.apache.org/
> Resolving localhost... 127.0.0.1, ::1
> Connecting to localhost|127.0.0.1|:8123... connected.
> Proxy request sent, awaiting response...

Sorry, please disregard.  The problem is my proxy (polipo).  Apache
gets it right, if I connect directly.

Regards
Alan

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org