X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_api.c;h=035c68e5fe6c5a330abbd99b345f0363b8e2d98c;hp=3760d310ee0c92f33375e27eb81292254415530c;hb=d4c80d57ea85f763fc5151aa68fab87a3aa4e800;hpb=01d4a3504df0f2f7092f420d108506edee23fe6c diff --git a/http_api.c b/http_api.c index 3760d31..035c68e 100644 --- a/http_api.c +++ b/http_api.c @@ -1159,8 +1159,12 @@ PHP_HTTP_API http_range_status _http_get_request_ranges(HashTable *ranges, size_ { /* "0-12345" */ case -10: - /* "0-", "0-0" or overflow */ - if (end == -1 || end == -10 || length <= end) { + /* "0-" */ + if (end == -1) { + return RANGE_NO; + } + /* "0-0" or overflow */ + if (end == -10 || length <= end) { return RANGE_ERR; } begin = 0; @@ -1184,7 +1188,7 @@ PHP_HTTP_API http_range_status _http_get_request_ranges(HashTable *ranges, size_ case -10: return RANGE_ERR; break; - + /* "12345-" */ case -1: if (length <= begin) {