From c9546830e020f4147d4c1ea22d60ca5ba965002f Mon Sep 17 00:00:00 2001 From: Dustin Barker Date: Thu, 20 Oct 2011 00:24:27 -0700 Subject: [PATCH] Ignore Content-Type for 204 No Content response. --- AFNetworking/AFHTTPRequestOperation.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AFNetworking/AFHTTPRequestOperation.m b/AFNetworking/AFHTTPRequestOperation.m index 1464dda..af988fd 100644 --- a/AFNetworking/AFHTTPRequestOperation.m +++ b/AFNetworking/AFHTTPRequestOperation.m @@ -78,7 +78,7 @@ } - (BOOL)hasAcceptableContentType { - return !self.acceptableContentTypes || [self.acceptableContentTypes containsObject:[self.response MIMEType]]; + return !self.acceptableContentTypes || [self.response statusCode] == 204 || [self.acceptableContentTypes containsObject:[self.response MIMEType]]; } #pragma mark - AFHTTPClientOperation