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.
This commit is contained in:
Peter Steinberger 2012-04-10 19:32:30 -07:00
parent 407374746c
commit dec3c9a03b

View file

@ -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];