On 10/4/05, Zoran Vasiljevic <[EMAIL PROTECTED]> wrote:
>
> Am 04.10.2005 um 09:37 schrieb Zoran Vasiljevic:
>
> > Hi,
> >
> > Vlad, you have made the ParseRange() call in the fastpath.c.
> > Can you help me understand the "Range:" header layout?
> > Is it something like:
> >
> >    Range: bytes=a-b,c-d,e-f
> >    or
> >    Range: bytes=-a
> >
> > Or, can it only be:
> >
> >    Range: bytes=a-b
> >    or
> >    Range: bytes=-a
> >
> > I have some trouble understanding this from the code.
> >
>
> Hm... after reading the code *again* (is ths true?)
>
>      /*
>       * Parse the "Range: bytes=" header. The header may contain zero
>       * or more range_spec's separated by ',' like:
>       *
>       *     bytes=[range_spec][,range_spec]...
>       *
>       * where range_spec could be one of:
>       *     first_byte_pos-last_byte_pos
>       *     -suffix_length
>       *
>       * The byte positions are inclusive; byte count starts at zero.
>       */


The tests contain examples of valid and invalid range headers. 
There's a also reference to the RFC.

See: tests/http_byteranges.test.

I think they're actually pretty complete, so if the tests pass you
haven't broken anything  :-).    But if you see some missing cases,
feel free to add them.

Reply via email to