Merge branch 'ignore-content-type' of https://github.com/dstnbrkr/AFNetworking into dstnbrkr-ignore-content-type
Conflicts: AFNetworking/AFHTTPRequestOperation.m
This commit is contained in:
commit
e85756ff4c
1 changed files with 4 additions and 1 deletions
|
|
@ -78,7 +78,10 @@
|
|||
}
|
||||
|
||||
- (BOOL)hasAcceptableContentType {
|
||||
return !self.acceptableContentTypes || [self.acceptableContentTypes containsObject:[self.response MIMEType]] || [self.response statusCode] == 204;
|
||||
// Don't invalidate content type if there is no content
|
||||
BOOL hasNoContent = [self.responseData length] == 0 || [self.response statusCode] == 204;
|
||||
|
||||
return !self.acceptableContentTypes || [self.acceptableContentTypes containsObject:[self.response MIMEType]] || hasNoContent;
|
||||
}
|
||||
|
||||
#pragma mark - AFHTTPClientOperation
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue