You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2011/08/26 18:58:34 UTC
svn commit: r1162165 - /httpd/httpd/trunk/modules/http/byterange_filter.c
Author: jim
Date: Fri Aug 26 16:58:34 2011
New Revision: 1162165
URL: http://svn.apache.org/viewvc?rev=1162165&view=rev
Log:
More merge fixes...
Modified:
httpd/httpd/trunk/modules/http/byterange_filter.c
Modified: httpd/httpd/trunk/modules/http/byterange_filter.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http/byterange_filter.c?rev=1162165&r1=1162164&r2=1162165&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http/byterange_filter.c (original)
+++ httpd/httpd/trunk/modules/http/byterange_filter.c Fri Aug 26 16:58:34 2011
@@ -548,22 +548,23 @@ static int ap_set_byterange(request_rec
}
in_merge = 0;
- if (start < ostart) {
- ostart = start;
- reversals++;
- in_merge = 1;
- }
- else if (start < oend || start == ostart) {
- in_merge = 1;
- }
- if (end >= oend && (start-1) <= oend) {
- oend = end;
- in_merge = 1;
+ if !(iend-1 < ostart || start-1 > oend) {
+ if (start < ostart) {
+ ostart = start;
+ reversals++;
+ in_merge = 1;
+ }
+ else if (start < oend || start == ostart) {
+ in_merge = 1;
+ }
+ if (end >= oend && (start-1) <= oend) {
+ oend = end;
+ in_merge = 1;
+ }
+ else if (end > ostart && end <= oend) {
+ in_merge = 1;
+ }
}
- else if (end > ostart && end <= oend) {
- in_merge = 1;
- }
-
if (in_merge) {
overlaps++;
continue;
@@ -574,6 +575,10 @@ static int ap_set_byterange(request_rec
idx = (indexes_t *)apr_array_push(indexes);
idx->start = ostart;
idx->end = oend;
+ /* new set again */
+ in_merge = 1;
+ ostart = start;
+ oend = end;
num_ranges++;
}
}