httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Slemko <>
Subject Re: [STATUS] 1.3b4-dev Sat Nov 22 18:26:26 EST 1997
Date Mon, 24 Nov 1997 06:39:02 GMT
On Sun, 23 Nov 1997, Alexei Kosut wrote:

> On Sun, 23 Nov 1997, Roy T. Fielding wrote:
> > >    * 206 vs. 200 issue on Content-Length
> > >	See <>
> > 
> > The current behavior is correct.  A range which extends beyond the actual
> > length of the entity is possible in cases where a device is attempting
> > to limit the response size (think PDA) even when it doesn't yet know
> > the actual length.  At least, that was the goal.
> But that's not the behavior in question. What you're talking about is
> "Range: bytes=0-16384", which sends a 206 and 16k if the entity is larger,
> and a 200 if it's smaller. Apache does that (at least, it should).
> What the PR is about is "Range: bytes=0-"; which in the PR submitter's
> opinion, and mine, should send a 206, but Apache currently sends a 200.
> Note that Apache will do the same thing if one has a file of 4498 bytes in
> length, and does a "Range: bytes=0-4497". It's a matter of "<" vs. "<=".

Note that, despite my given reason for liking how it is done now and for
not liking the change, I wouldn't object to it.

It should be noted that neither way of doing things can break any client
that follows the spec and only expects what the spec guarentees. 

Also note that, either way, I would suggest there is a bug.  If you go
with Alexei's view (which seems to be better supported by the spec), the
bug is obvious.  If you agree that sending a 200 is good, then the bug is
not sending an Accept-Ranges: header for such requests.  We also don't
send an Accept-Range: for requests with invalid bytes Range headers; this
is because set_byterange only sets that in headers_out if there is no byte
range request.  I am of the opinion that this would be useful to also send
it if set_byterange returns without setting a 206 status.  This gives
information to the client that we can support a range request, we just
didn't like their request.

View raw message