Added -hasByteRange API

This commit is contained in:
Pierre-Olivier Latour
2014-04-07 19:29:04 -07:00
parent c51f9ad7d9
commit fb08e77c0c
4 changed files with 10 additions and 1 deletions
+1 -1
View File
@@ -81,7 +81,7 @@ static inline NSError* _MakePosixError(int code) {
ARC_RELEASE(self);
return nil;
}
if ((range.location != NSNotFound) || (range.length > 0)) {
if (GCDWebServerIsValidByteRange(range)) {
if (range.location != NSNotFound) {
range.location = MIN(range.location, (NSUInteger)info.st_size);
range.length = MIN(range.length, (NSUInteger)info.st_size - range.location);