The response ended prematurely, with at least 34256189 additional bytes expected.
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
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
}
};
Regarding the closed issue #9
Please test the new version 2.0.7 for this problem. Thanks