httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexei Kosut <ako...@leland.Stanford.EDU>
Subject Re: protocol/1464: Response for Byte-Range containing whole file "Range: bytes=0-" (fwd)
Date Sun, 23 Nov 1997 21:49:57 GMT
On Sun, 23 Nov 1997, Marc Slemko wrote:

[Requests for "Range: bytes=0-" return a 200 request]

> Comments?
> 
> This behaviour is caused by:
> 
>     return (*start > 0 || *end < clength - 1);
> 
> and, in the general case, it makes sense to behave this way.  If you send
> a 206, then a good number of caches will not be able to cache the
> response, which sucks.  

Except that "bytes=0-" is a range. And we probably should send it. The
code wasn't written that way with this case in mind; it was written to
catch out-of-band ranges, and just send them 200s (that's what the spec
says, if I recall). The "*end < clength - 1" should probably be an
"*end <= clength - 1".

That would fix this problem.

> So what is the accepted way to figure out if a server can send byte-ranges
> for a particular request?  Do a HEAD?  That isn't very nice.

Check for an Accept-Ranges header. Although it's not required, most
servers will send them for entities that support ranges.

Though I must admit that sending a "Range: bytes=0-" and checking the
response code is a pretty clever idea.

-- Alexei Kosut <akosut@stanford.edu> <http://www.stanford.edu/~akosut/>
   Stanford University, Class of 2001 * Apache <http://www.apache.org> *



Mime
View raw message