title: NSMutableURLRequest timeout doesn't trigger if data starts to load but not webViewDidFinishLoad
body: <p>I am loading a UIWebview and requesting a URL that can take some time to finish loading.  The request starts and begins to receive data.  However, it doesn't appear that the request finishes.  The webViewDidFinishLoad never triggers nor does the webView didFailLoadWithError:  callback.</p>
  
  <p>Does a timeout of a NSURLRequest only occur if there is no response receiving data or does it trigger if the request doesn't complete in that interval as well?</p>
  
  <p>If it's the former, is there an elegant solution to timing out the request?</p>
  
  <p>Relevant code is:</p>
  
  <p>Load the request:</p>
  
  <p><code>
  - (void) loadRequest {
      NSString *targetURL = @"<a href="http://myrequestUrl/" rel="nofollow noreferrer">http://myrequestUrl/</a>";
      NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] initWithURL: [NSURL URLWithString: targetURL] cachePolicy: NSURLRequestReloadIgnoringLocalCacheData timeoutInterval: 15.0] autorelease];</p>
  
  <pre><code>[request setHTTPBasicID: [[self credentialManager] userID] password:[[self credentialManager] password]];
  [webView loadRequest:request];
  </code></pre>
  
  <p></code></p>
  
  <p>Delegate to respond to timeout</p>
  
  <p><code>
  - (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error {
      [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible: NO];
      [alert hide];
      [alert autorelease];
      alert = nil;
      NSLog(@"error - %@", error);
      [self showRetryPrompt: error];<br>
  }
  </code></p>