This issue comes when i load website into webview of my cocoa application. my issue description:
Error Domain=NSURLErrorDomain Code=-1007 "too many HTTP redirects" UserInfo=0x18d17d56{NSErrorFailingURLStringKey=URLHERE, NSErrorFailingURLKey=URLHERE,NSLocalizedDescription=too many HTTP redirects}
why this error comes
how to handle it
i go though following links but does't help me
Too many HTTP redirects
"too many HTTP redirects" while using Alamofire Upload Multipart Form Data
too many HTTP redirects, Google Drive, iOS SDK and many more..
UPDATE:
- (NSURLRequest *)webView:(WebView *)sender resource:(id)identifier willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse fromDataSource:(WebDataSource *)dataSource {
if(redirectResponse)
{
if([redirectResponse.URL.absoluteString isEqualToString:self.webviewLoadingURL.absoluteString])
{
NSLog(@"both redirect and load url is same");
}
}
return request;
}
I getting same url for redirect and load in webview.