Changing -hasContent to readonly @property

Changing conditions of not having property to be either length == 0 or status code == 204
This commit is contained in:
Mattt Thompson 2011-10-21 13:56:31 -05:00
parent 71a7a06649
commit 25ea84a891

View file

@ -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 {