You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Marc Slemko <ma...@znep.com> on 1997/03/04 06:12:20 UTC

bug in byte ranges?

with the following request:

	GET /~marcs/i.html HTTP/1.1
	User-Agent: fetch/1.0 FreeBSD/2.2-GAMMA (i386)
	Accept: */*
	Host: alive:80
	Connection: close
	If-Range: Sat, 01 Feb 1997 09:12:20 GMT
	Range: bytes=122880-

Recent Apache says:

	HTTP/1.1 206 Partial Content
	Date: Tue, 04 Mar 1997 05:09:59 GMT
	Server: Apache/1.2b8-dev
	Connection: close
	Content-Type: text/html
	Last-Modified: Sat, 01 Feb 1997 09:12:20 GMT
	ETag: "c613-190be9-32f308f4"
	Content-Length: 1518569
	Content-Range: bytes 122880-1641448/1641449

Why does it end at 1641448 instead of 1641449?  

No time to look at it further right now.


Re: bug in byte ranges?

Posted by Alexei Kosut <ak...@nueva.pvt.k12.ca.us>.
On Mon, 3 Mar 1997, Marc Slemko wrote:

> 	HTTP/1.1 206 Partial Content
> 	Date: Tue, 04 Mar 1997 05:09:59 GMT
> 	Server: Apache/1.2b8-dev
> 	Connection: close
> 	Content-Type: text/html
> 	Last-Modified: Sat, 01 Feb 1997 09:12:20 GMT
> 	ETag: "c613-190be9-32f308f4"
> 	Content-Length: 1518569
> 	Content-Range: bytes 122880-1641448/1641449
> 
> Why does it end at 1641448 instead of 1641449?  

Because that's what the HTTP spec tells it to do. Byteranges start
counting at 0, but the total values count bytes normally. So the
1641449th byte of the file is numbered 1641448.

People complained about it a bit when it was first proposed that way,
but it stuck. *shrug*

-- 
________________________________________________________________________
Alexei Kosut <ak...@nueva.pvt.k12.ca.us>      The Apache HTTP Server
URL: http://www.nueva.pvt.k12.ca.us/~akosut/   http://www.apache.org/