From 25ea84a891f184fa7c12453117f16b584364e7e0 Mon Sep 17 00:00:00 2001 From: Mattt Thompson Date: Fri, 21 Oct 2011 13:56:31 -0500 Subject: [PATCH] Changing -hasContent to readonly @property Changing conditions of not having property to be either length == 0 or status code == 204 --- AFNetworking/AFHTTPRequestOperation.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AFNetworking/AFHTTPRequestOperation.m b/AFNetworking/AFHTTPRequestOperation.m index c64096c..571d918 100644 --- a/AFNetworking/AFHTTPRequestOperation.m +++ b/AFNetworking/AFHTTPRequestOperation.m @@ -23,8 +23,8 @@ #import "AFHTTPRequestOperation.h" @interface AFHTTPRequestOperation () -- (BOOL)hasContent; @property (readwrite, nonatomic, retain) NSError *error; +@property (readonly, nonatomic, assign) BOOL hasContent; @end @implementation AFHTTPRequestOperation @@ -75,7 +75,7 @@ } - (BOOL)hasContent { - return [self.responseData length] > 0 && [self.response statusCode] != 204; + return [self.responseData length] > 0 || [self.response statusCode] != 204; } - (BOOL)hasAcceptableStatusCode {