Commit 2f01f6ff authored by Greg Ames's avatar Greg Ames
Browse files

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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1162434 13f79535-47bb-0310-9956-ffa450edef68
parent ba010068
Loading
Loading
Loading
Loading
+3 −1
Changes for modules/http/byterange_filter.c: 3 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -532,7 +532,9 @@ static int ap_set_byterange(request_rec *r, apr_off_t clength,
        }
        in_merge = 0;

        if (!(end <= ostart || start-1 >= oend)) {
        AP_DEBUG_ASSERT((start <= end) && (ostart <= oend));
        
        if (start-1 < oend) {
            if (start < ostart) {
                ostart = start;
                reversals++;