Downloader icon indicating copy to clipboard operation
Downloader copied to clipboard

The response ended prematurely, with at least 34256189 additional bytes expected.

Open fengyuan213 opened this issue 5 years ago • 2 comments

System.IO.IOException HResult=0x80131620 Message=The response ended prematurely, with at least 34256189 additional bytes expected. Source=System.Net.Http StackTrace: at System.Net.Http.HttpConnection.ContentLengthReadStream.Read(Span1 buffer) at System.Net.Http.HttpBaseStream.Read(Byte[] buffer, Int32 offset, Int32 count) at Downloader.ThrottledStream.Read(Byte[] buffer, Int32 offset, Int32 count) in C:\Users\Fengyuan\Source\Repos\Downloader3\src\Downloader\ThrottledStream.cs:line 176 at System.IO.Stream.<>c.<BeginReadInternal>b__43_0(Object ) at System.Threading.Tasks.Task1.InnerInvoke() at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)

Problem not solved at all.. still the same Download Url: http://resources.downloads.pokecity.club/2020.rar Downloader configuration:

    var downloadOpt = new DownloadConfiguration
    {
        ParallelDownload = true, // download parts of file as parallel or not
        BufferBlockSize = 10240, // usually, hosts support max to 8000 bytes
        ChunkCount = 8, // file parts to download
        MaxTryAgainOnFailover = int.MaxValue, // the maximum number of times to fail.
        OnTheFlyDownload = false, // caching in-memory or not?
        Timeout = 1000, // timeout (millisecond) per stream block reader
        MaximumBytesPerSecond =0, //1024 * 1024, // speed limited to 1MB/s
        TempDirectory = "C:\\temp", // Set the temp path for buffering chunk files, the default path is Path.GetTempPath().
        RequestConfiguration = // config and customize request headers
        {
            Accept = "*/*",
            UserAgent = $"DownloaderSample/{Assembly.GetExecutingAssembly().GetName().Version.ToString(3)}",
            ProtocolVersion = HttpVersion.Version11,
            KeepAlive = false,
            UseDefaultCredentials = false
        }
    };

fengyuan213 avatar Sep 03 '20 12:09 fengyuan213

Regarding the closed issue #9

fengyuan213 avatar Sep 03 '20 12:09 fengyuan213

Please test the new version 2.0.7 for this problem. Thanks

bezzad avatar Jan 24 '21 07:01 bezzad