From dec3c9a03b3b69657ac04c3bd86444074d2c3e7d Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Tue, 10 Apr 2012 19:32:30 -0700 Subject: [PATCH] The cache policy set here was from the WRONG enum. So NSURLCacheStorgeNotAllowed has the value 2, which maps to NSURLRequestReturnCacheDataElseLoad. I'm not sure why this is here in the first place, but the correct enum is of the type NSURLRequestCachePolicy. --- AFNetworking/AFHTTPClient.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AFNetworking/AFHTTPClient.m b/AFNetworking/AFHTTPClient.m index 60b44a4..b304642 100644 --- a/AFNetworking/AFHTTPClient.m +++ b/AFNetworking/AFHTTPClient.m @@ -693,7 +693,7 @@ static inline NSString * AFMultipartFormFinalBoundary() { } NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:fileURL]; - [request setCachePolicy:NSURLCacheStorageNotAllowed]; + [request setCachePolicy:NSURLRequestReloadIgnoringLocalCacheData]; NSURLResponse *response = nil; NSData *data = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:error];