Merge pull request #972 from aburgel/needNewBodyStream_cancel
Register error if new bodyStream cannot be created
This commit is contained in:
commit
38c49e1532
1 changed files with 9 additions and 1 deletions
|
|
@ -704,7 +704,15 @@ didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
|
||||||
if ([request.HTTPBodyStream conformsToProtocol:@protocol(NSCopying)]) {
|
if ([request.HTTPBodyStream conformsToProtocol:@protocol(NSCopying)]) {
|
||||||
return [request.HTTPBodyStream copy];
|
return [request.HTTPBodyStream copy];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.error = [NSError errorWithDomain:AFNetworkingErrorDomain code:NSURLErrorCancelled userInfo:nil];
|
||||||
|
|
||||||
|
[self.outputStream close];
|
||||||
|
|
||||||
|
[self finish];
|
||||||
|
|
||||||
|
self.connection = nil;
|
||||||
|
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue