From: Ryan Bloom Date: Sun, 28 Jan 2001 04:07:03 +0000 (+0000) Subject: Fix some byterange handling. If we get a byte range that looks like X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3ad445cfc473b955e5ceac2bc558831e59b66e8b;p=apache Fix some byterange handling. If we get a byte range that looks like "-999999" where that is past the end of the file, we should return a PARTIAL CONTENT status code, and return the whole file as one big byterange. This matches the 1.3 handling now. [Ryan Bloom] git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87885 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 44a0fcad6e..30e3a7f790 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,10 @@ Changes with Apache 2.0b1 + *) Fix some byterange handling. If we get a byte range that looks like + "-999999" where that is past the end of the file, we should return + a PARTIAL CONTENT status code, and return the whole file as one big + byterange. This matches the 1.3 handling now. [Ryan Bloom] + *) Make the error bucket a real meta-data bucket. This means that the bucket length is 0, and a read returns NULL data. If one of these buckets is passed down after the headers are sent, this data will diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index b66254bccc..f500b0b9f6 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -185,7 +185,7 @@ static int parse_byterange(char *range, apr_off_t clength, if (*start > *end) return -1; - return (*start > 0 || *end < clength - 1); + return (*start > 0 || *end < clength); } static int ap_set_byterange(request_rec *r);