title: Downloading file with ASIHTTPRequest - iPhone app
body: <p>I am using the ASIHTTPRequest source code to download a file from a remote location. Surprisingly, the download happens but nothing happens after that. I have put in a log statement in the <strong>handleBytesAvailable</strong> method and can see the entire file worth of data is downloaded in parts and added to the <strong>fileDownloadOutputStream</strong> variable.</p>
  
  <p>But once all the bytes have been downloaded, nothing happens. The delegate methods are not called (neither fail, nor success).</p>
  
  <p>Can someone please tell me what is happening? Or what is the correct way to download a file from a remote server using ASIHTTPRequest?</p>
  
  <p>Thanks.</p>
  
  <p><strong>Few more details</strong></p>
  
  <p>On putting more log statements, it appears that after all the bytes have been downloaded, the request class gets a timeout response. And after that the delegate methods are not called. Not sure why the timeout should happen because I can see from the logs that all the bytes of the file have been downloaded already. Does this help?</p>