title: totalBytesExpectedToWrite is -1 in NSURLSessionDownloadTask
body: <p>I faced with a strange problem. I load file from the Internet using <code>NSURLSession</code> and <code>NSURLSessionDownloadTask</code>. Here is the code</p>
  
  <pre><code>NSURLSessionConfiguration *sessionConfiguration =
  [NSURLSessionConfiguration backgroundSessionConfiguration:kSessionId];
  self.session = [NSURLSession sessionWithConfiguration:sessionConfiguration
                                               delegate:self
                                          delegateQueue:[NSOperationQueue new]];
  NSURL *url = [NSURL URLWithString:urlString];
  NSURLRequest *request = [NSURLRequest requestWithURL:url];
  NSURLSessionDownloadTask *downloadTask = [self.session downloadTaskWithRequest:request];
  [downloadTask resume];
  </code></pre>
  
  <p>My class is declared as <code>NSURLSessionDownloadDelegate</code> and I get callbacks well. But when the system calls the delegate method</p>
  
  <pre><code>- (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTask *)downloadTask didWriteData:(int64_t)bytesWritten totalBytesWritten:(int64_t)totalBytesWritten totalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite
  {
      NSLog(@"totalBytesExpectedToWrite: %lld", totalBytesExpectedToWrite);
      NSLog(@"%lld", totalBytesWritten);
  }
  </code></pre>
  
  <p><code>totalBytesExpectedToWrite</code> always equal <code>-1</code> and I have no ability to show a progress to user because I don't know the downloading file's size.</p>
  
  <p>Could you prompt me where I made a mistake?</p>