title: How to handle "too many HTTP redirects" Error
body: <p>This issue comes when i load website into  webview of my cocoa application.
  my issue description:</p>
  
  <blockquote>
    <p>Error Domain=NSURLErrorDomain Code=-1007 "too many HTTP redirects"
    UserInfo=0x18d17d56{NSErrorFailingURLStringKey=URLHERE,
    NSErrorFailingURLKey=URLHERE,NSLocalizedDescription=too many HTTP
    redirects}</p>
  </blockquote>
  
  <p>why this error comes<br>
  how to handle it</p>
  
  <p>i go though following links but does't help me</p>
  
  <p><a href="https://stackoverflow.com/questions/23221662/too-many-http-redirects">Too many HTTP redirects</a><br>
  <a href="https://stackoverflow.com/questions/33727493/too-many-http-redirects-while-using-alamofire-upload-multipart-form-data">&quot;too many HTTP redirects&quot; while using Alamofire Upload Multipart Form Data</a><br>
  <a href="https://stackoverflow.com/questions/38082914/too-many-http-redirects-google-drive-ios-sdk">too many HTTP redirects, Google Drive, iOS SDK</a> and many more..</p>
  
  <p>UPDATE:</p>
  
  <pre><code>- (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;
  }
  </code></pre>
  
  <p>I getting same url for redirect and load in webview.</p>