#17 Added support for chunked transfer encoding in request bodies

This commit is contained in:
Pierre-Olivier Latour
2014-04-07 12:21:19 -07:00
parent c213e167b4
commit 7af258eb6b
9 changed files with 172 additions and 57 deletions
+5 -1
View File
@@ -46,7 +46,11 @@
- (BOOL)open:(NSError**)error {
DCHECK(_data == nil);
_data = [[NSMutableData alloc] initWithCapacity:self.contentLength];
if (self.contentLength != NSNotFound) {
_data = [[NSMutableData alloc] initWithCapacity:self.contentLength];
} else {
_data = [[NSMutableData alloc] init];
}
if (_data == nil) {
*error = [NSError errorWithDomain:kGCDWebServerErrorDomain code:-1 userInfo:@{NSLocalizedDescriptionKey: @"Failed allocating memory"}];
return NO;