Authored by Matej Bukovinski

Send out progress callbacks sooner.

- as soon as the NSURLConnection gets initialized
- helps to allocate and show progress indication sooner and prevent large delays without progress indication (for example when the server takes long to respond)
- estimated size is always 0 at this point, clients can use this to decide if they want to handle this callback or skip it
@@ -71,6 +71,10 @@ @@ -71,6 +71,10 @@
71 71
72 if (self.connection) 72 if (self.connection)
73 { 73 {
  74 + if (self.progressBlock)
  75 + {
  76 + self.progressBlock(0, 0);
  77 + }
74 [[NSNotificationCenter defaultCenter] postNotificationName:SDWebImageDownloadStartNotification object:self]; 78 [[NSNotificationCenter defaultCenter] postNotificationName:SDWebImageDownloadStartNotification object:self];
75 } 79 }
76 else 80 else