> -----Original Message----- > From: Stefan Fritsch [mailto:s...@sfritsch.de] > Sent: Freitag, 26. August 2011 15:41 > To: dev@httpd.apache.org > Subject: Re: svn commit: r1161661 - > /httpd/httpd/trunk/modules/http/byterange_filter.c > > On Fri, August 26, 2011 14:38, Jim Jagielski wrote: > > > > On Aug 26, 2011, at 8:31 AM, Jim Jagielski wrote: > >> > >> Agreed... The issue is that to merge, you need to parse... We > could have > >> ap_set_byterange() also return a set of start/stop points (in an > >> array), so that the filter can work with that and not bother with > >> rereading > >> r->range. In fact, I think that makes the most sense... That > is, adjust > >> ap_set_byterange() to create the modified, parsed > r->range, a return > >> status > >> and the start/stop array. The filter then goes thru that array. > > > > So ap_set_byterange(request_rec *r, apr_off_t clen, > apr_array_header_t > > *indexes) > > will exist and parse_byterange() will go away... > > > > Sound OK? > > Sounds OK to me. But I would prefer that the array is > allocated with the > right size right from the start instead of growing an apr_array which > would again involve lots of copying.
I guess we can do both: Count the ',' and give the number to apr_array_make Regards Rüdiger