httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guille (Bisho)" <bi...@eurielec.etsit.upm.es>
Subject Re: Error 416: Requested range not satisfiable
Date Sat, 27 Jan 2001 21:21:44 GMT
>      10.4.17 416 Requested Range Not Satisfiable
> 
>      A server SHOULD return a response with this status code if a
>      request included a Range request-header field (section 14.35),
>      and none of the range-specifier values in this field overlap
>      the current extent of the selected resource, and the request
>      did not include an If-Range request-header field. (For
>      byte-ranges, this means that the first- byte-pos of all of
>      the byte-range-spec values were greater than the current
>      length of the selected resource.)
> 
>      When this status code is returned for a byte-range request,
>      the response SHOULD include a Content-Range entity-header
>      field specifying the current length of the selected resource
>      (see section 14.16). This response MUST NOT use the
>      multipart/byteranges content- type.

Also from the RFC:

     If the last-byte-pos value is present, it MUST be greater
     than or equal to the first-byte-pos in that byte-range-spec,
     or the byte- range-spec is syntactically invalid. The
     recipient of a byte-range- set that includes one or more
     syntactically invalid byte-range-spec values MUST ignore
     the header field that includes that byte-range- set. 

So it seems that Apache should't response a 416 for a 5-4 range, but
simply return the file ignoring the Range request.

416 should be returned for a 99999999999- range for example, where the

In conclusion:

Range:	Type:		Should:		Apache 2.0 Returns:
---------------------------------------------------------------
5-4	Invalid		ignore ranges,	conection close
			return file
99999-	file not so big	416 error	ignores ranges, return file
foo	Invalid		ignore ranges,	ignores ranges, return file
			return file	(well done)
-99999	file not so big	return partial	ignores ranges, return file
			content
In this last case, as the ranges overlap zones of the file it should be
considered as good request, and return a Content-Range: bytes
0-foo/(foo+1). Apache simple takes it as an invalid request, as the
999999-

-50-100-10	I'm not sure. IIS takes it as invalid. Apache takes
		the first number "-50" and returns Partial Content.

-- 
     \|||||||/    Guillermo Pérez Pérez
     < o   o >      - bisho@onirica.com
      \  L  /       - bisho@eurielec.etsit.upm.es
 -oOOo-------oOOo-
 Onírica: Análisis, diseño e implantación de soluciones informáticas
          http://www.onirica.com

Mime
View raw message