On 10/4/05, Zoran Vasiljevic <zv...@ar...> 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=3Da-b,c-d,e-f
> > or
> > Range: bytes=3D-a
> >
> > Or, can it only be:
> >
> > Range: bytes=3Da-b
> > or
> > Range: bytes=3D-a
> >
> > I have some trouble understanding this from the code.
> >
>
> Hm... after reading the code *again* (is ths true?)
>
> /*
> * Parse the "Range: bytes=3D" header. The header may contain zero
> * or more range_spec's separated by ',' like:
> *
> * bytes=3D[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.=20
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.
|