On Thursday 25 August 2011, Roy T. Fielding wrote:
> On Aug 25, 2011, at 2:02 PM, Jim Jagielski wrote:
> > Using stef's byterange4 test, I'm seeing:
> >
> > apr_brigade_length (bb=0x7feb00a23200, read_all=1,
> > length=0x7fff6e03e8b0) at apr_brigade.c:201 201 if
> > (bkt->length == (apr_size_t)(-1)) {
>
> apr_size_t is unsigned. That's borked.
Still, that's how it's implemented in apr-util:
/** The length of the data in the bucket. This could have been
implemented
* with a function, but this is an optimization, because the most
* common thing to do will be to get the length. If the length
is unknown,
* the value of this field will be (apr_size_t)(-1).
*/
apr_size_t length;
Maybe it should actually be APR_SIZE_T_MAX...