]> granicus.if.org Git - apache/commitdiff
Fix some byterange handling. If we get a byte range that looks like
authorRyan Bloom <rbb@apache.org>
Sun, 28 Jan 2001 04:07:03 +0000 (04:07 +0000)
committerRyan Bloom <rbb@apache.org>
Sun, 28 Jan 2001 04:07:03 +0000 (04:07 +0000)
"-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

CHANGES
modules/http/http_protocol.c

diff --git a/CHANGES b/CHANGES
index 44a0fcad6e325f6931ebe86960f1a4fb911ae97f..30e3a7f790a65d5c5f39be7a4444fdd1f26657ea 100644 (file)
--- 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
index b66254bcccc61555231bdef03a51a0c0683f4252..f500b0b9f6734b6073193019b2bcc764cc14740e 100644 (file)
@@ -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);