Adding assertion for empty data in -appendPartWithHeaders:body:

This commit is contained in:
Jonathan Beilin 2012-12-17 10:31:00 -08:00
parent 0f35164082
commit fa0fc535a1

View file

@ -851,6 +851,8 @@ NSTimeInterval const kAFUploadStream3GSuggestedDelay = 0.2;
- (void)appendPartWithHeaders:(NSDictionary *)headers - (void)appendPartWithHeaders:(NSDictionary *)headers
body:(NSData *)body body:(NSData *)body
{ {
NSParameterAssert(body);
AFHTTPBodyPart *bodyPart = [[AFHTTPBodyPart alloc] init]; AFHTTPBodyPart *bodyPart = [[AFHTTPBodyPart alloc] init];
bodyPart.stringEncoding = self.stringEncoding; bodyPart.stringEncoding = self.stringEncoding;
bodyPart.headers = headers; bodyPart.headers = headers;