httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: svn commit: r1162565 - /httpd/httpd/trunk/modules/http/byterange_filter.c
Date Mon, 29 Aug 2011 14:54:00 GMT

On Aug 28, 2011, at 1:52 PM, rpluem@apache.org wrote:
> +    *indexes = apr_array_make(r->pool, ranges, sizeof(indexes_t));
> +    merged = apr_array_make(r->pool, ranges, sizeof(char *));
>     while ((cur = ap_getword(r->pool, &range, ','))) {
>         char *dash;
>         char *errp;
> @@ -560,7 +571,7 @@ static int ap_set_byterange(request_rec 
>             new = (char **)apr_array_push(merged);
>             *new = apr_psprintf(r->pool, "%" APR_OFF_T_FMT "-%" APR_OFF_T_FMT,
>                                     ostart, oend);
> -            idx = (indexes_t *)apr_array_push(indexes);
> +            idx = (indexes_t *)apr_array_push(*indexes);
>             idx->start = ostart;
>             idx->end = oend;
>             sum_lengths += oend - ostart + 1;

If we wanted to get really fancy, we could just prealloc the
indexes array, and then then, at the end, create merged from
that…

Maybe an enhancement for trunk, but let's get 2.2 out first I guess !


Mime
View raw message