You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by gr...@apache.org on 2011/08/27 21:57:42 UTC
svn commit: r1162434 - /httpd/httpd/trunk/modules/http/byterange_filter.c
Author: gregames
Date: Sat Aug 27 19:57:41 2011
New Revision: 1162434
URL: http://svn.apache.org/viewvc?rev=1162434&view=rev
Log:
merge totally reversed ranges like 4-5,1-2 into 1-5
I interpret the former test
if (!(end <= ostart || start-1 >= oend)) {
as
if (not(end is bad || start is good)) { merge }
ORing the bad condition with the good doesn't produce the desired result.
it is not necessary to test "end" due to the conditions tested in the assert.
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=1162434&r1=1162433&r2=1162434&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http/byterange_filter.c (original)
+++ httpd/httpd/trunk/modules/http/byterange_filter.c Sat Aug 27 19:57:41 2011
@@ -531,8 +531,10 @@ static int ap_set_byterange(request_rec
continue;
}
in_merge = 0;
+
+ AP_DEBUG_ASSERT((start <= end) && (ostart <= oend));
- if (!(end <= ostart || start-1 >= oend)) {
+ if (start-1 < oend) {
if (start < ostart) {
ostart = start;
reversals++;