anchor.diff:                      let mutable readSinceLastMeasure = 0L
   
                       let requestMsg = new HttpRequestMessage(HttpMethod.Get, downloadUri)
  -                    let! responseMsg = client.SendAsync(requestMsg, HttpCompletionOption.ResponseHeadersRead, t.Token) |> Async.AwaitTask
  +                    let! responseMsg = client.SendAsync(requestMsg, HttpCompletionOption.ResponseHeadersRead, requestTokenSource.Token) |> Async.AwaitTask
                       match responseMsg.StatusCode with
                       | HttpStatusCode.OK -> ()
                       | statusCode -> failwithf "HTTP status code was %d - %O" (int statusCode) statusCode
   
                       let! httpResponseStream = responseMsg.Content.ReadAsStreamAsync() |> Async.AwaitTask
  -                    httpResponseStream.ReadTimeout <- Timeout.Infinite;
  +                    httpResponseStream.ReadTimeout <- responseStreamTimeout;
   
                       let bufferSize = 1024 * 10
                       let buffer : byte [] = Array.zeroCreate bufferSize
  
positive.code:                             tracefn "Still downloading from %O to %s (%d kbit/s, %s %%)" !downloadUrl targetFileName speed percent
                              readSinceLastMeasure <- 0L
                              lastSpeedMeasure.Restart()
                          // if there is no response for a minute -> abort
  
                          let! bytes = httpResponseStream.ReadAsync(buffer, 0, bufferSize, s.Token) |> Async.AwaitTaskWithoutAggregate
                          //let! bytes = httpResponseStream.AsyncRead(buffer, 0, bufferSize)
                          bytesRead := bytes
                          do! fileStream.WriteAsync(buffer, 0, !bytesRead, tok) |> Async.AwaitTaskWithoutAggregate
                          readSinceLastMeasure <- readSinceLastMeasure + int64 bytes
                          pos <- pos + int64 bytes
  
  
negative.code:                     ensureDir targetFileName
  
                      use _trackDownload = Profile.startCategory Profile.Category.NuGetDownload
                      let! cancellationToken = Async.CancellationToken
  
                      // default of three minute timeout
                      let defaultTimeout = 180000
                      let getTimeoutOrDefaultValue registryEntry defaultValue =
                          match Environment.GetEnvironmentVariable registryEntry with
                          | a when System.String.IsNullOrWhiteSpace a -> defaultValue
                          | a ->
                              match System.Int32.TryParse a with
                              | true, v -> v
                              | _ -> traceWarnfn "%s is not set to an interval in milliseconds, ignoring the value and defaulting to %d" registryEntry defaultValue
                                     defaultValue
  
                      // timeout for the request of the package to be downloaded
                      let requestTimeout =
                          getTimeoutOrDefaultValue "PAKET_REQUEST_TIMEOUT" defaultTimeout
                      // timeout for response of the stream for the package to be downloaded
                      let responseStreamTimeout =                    
                          getTimeoutOrDefaultValue "PAKET_RESPONSE_STREAM_TIMEOUT" defaultTimeout
                      // timeout for the read and write stream operations on the package to be downloaded
                      let streamReadWriteTimeout =
                          getTimeoutOrDefaultValue "PAKET_STREAMREADWRITE_TIMEOUT" defaultTimeout
  
                      let requestTokenSource = System.Threading.CancellationTokenSource.CreateLinkedTokenSource cancellationToken
                      let streamReadWriteTokenSource = System.Threading.CancellationTokenSource.CreateLinkedTokenSource cancellationToken
  
                      streamReadWriteTokenSource.CancelAfter streamReadWriteTimeout
                      requestTokenSource.CancelAfter requestTimeout
  
                      let client = NetUtils.createHttpClient(!downloadUrl, source.Auth.Retrieve (attempt <> 0))
  
  