--- modules/http/byterange_filter.c~ 2011-12-31 01:46:54.410084655 +0100 +++ modules/http/byterange_filter.c 2011-12-31 01:51:09.672518684 +0100 @@ -523,6 +523,20 @@ } else { /* "5-" */ end = clength - 1; + /* + * special case: 0- + * ignore all other ranges provided + * return as a single range: 0- + */ + if (start == 0) { + apr_array_clear(*indexes); + idx = (indexes_t *)apr_array_push(*indexes); + idx->start = start; + idx->end = end; + sum_lengths = clength; + num_ranges = 1; + break; + } } } @@ -546,9 +560,9 @@ num_ranges++; } - if (sum_lengths >= clength) { + if (sum_lengths > clength) { ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, - "Sum of ranges not smaller than file, ignoring."); + "Sum of ranges larger than file, ignoring."); return 0; }