Hi,
Given a rails application which communicates with my ipad app. I'm using async connection with http authentication. And i would like to test the credentials if they are ok. The problem is that if i enter the good credentials and after that i'm changing to a wrong one, the connection still accepts. Only refuses when I reopen the application. Might be some caching issue, i tried to clear the cache also on the ipad.
Connection initialization.
NSURLRequest *request =
[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://localhost:3000"] cachePolicy:NSURLRequestReloadIgnoringLocalAndRemoteCacheData timeoutInterval:60.0];
[NSURLConnection connectionWithRequest:request delegate:self];
also implemented the willcacheresponse method
- (NSCachedURLResponse *)connection:(NSURLConnection *)connection willCacheResponse:(NSCachedURLResponse *)cachedResponse {
return nil;
}