From: Jim Jagielski Date: Thu, 25 Aug 2011 18:33:26 +0000 (+0000) Subject: Optimize... and break if we get eg 200-100 X-Git-Tag: 2.3.15~355 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b1d0fe9cd64595b589e7b8b94629e790e7a65ad9;p=thirdparty%2Fapache%2Fhttpd.git Optimize... and break if we get eg 200-100 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1161681 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http/byterange_filter.c b/modules/http/byterange_filter.c index 63e46798f6d..bba0a8a66e2 100644 --- a/modules/http/byterange_filter.c +++ b/modules/http/byterange_filter.c @@ -566,6 +566,9 @@ static int ap_set_byterange(request_rec *r) break; } end = number; + if (start > end) { + break; + } if (!in_merge) { ostart = start; oend = end; @@ -575,7 +578,7 @@ static int ap_set_byterange(request_rec *r) ostart = start; in_merge = 1; } - if (start > ostart && start < oend) { + if (start < oend) { in_merge = 1; } if ((end-1) >= oend) {