- catch ranges starting with 0
authorMichael Wallner <mike@php.net>
Tue, 16 Aug 2005 15:24:00 +0000 (15:24 +0000)
committerMichael Wallner <mike@php.net>
Tue, 16 Aug 2005 15:24:00 +0000 (15:24 +0000)
http_headers_api.c

index 11815f25a835a81112da1a08c6aad73628cbf063..81a24e3856b61659f9bf149bc4c2964fd7244403 100644 (file)
@@ -124,7 +124,10 @@ PHP_HTTP_API http_range_status _http_get_request_ranges(HashTable *ranges, size_
                switch (c = *(range++))
                {
                        case '0':
-                               *ptr *= 10;
+                               /* allow 000... - shall we? */
+                               if (*ptr != -10) {
+                                       *ptr *= 10;
+                               }
                        break;
 
                        case '1': case '2': case '3':