Added GCDWebServerHTTPStatusCodes.h

This commit is contained in:
Pierre-Olivier Latour
2014-04-07 19:27:58 -07:00
parent 7ec8d5247a
commit c51f9ad7d9
8 changed files with 143 additions and 16 deletions
+1 -1
View File
@@ -100,7 +100,7 @@ static inline NSError* _MakePosixError(int code) {
if (range.location != NSNotFound) {
_offset = range.location;
_size = range.length;
[self setStatusCode:206];
[self setStatusCode:kGCDWebServerHTTPStatusCode_PartialContent];
[self setValue:[NSString stringWithFormat:@"bytes %i-%i/%i", (int)range.location, (int)(range.location + range.length - 1), (int)info.st_size] forAdditionalHeader:@"Content-Range"];
LOG_DEBUG(@"Using content bytes range [%i-%i] for file \"%@\"", (int)range.location, (int)(range.location + range.length - 1), path);
} else {