Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileResumeRequest 下载,可能报错 416 Range Not Satisfiable #311

Closed
zhe4967 opened this issue Jun 13, 2024 · 0 comments
Closed

FileResumeRequest 下载,可能报错 416 Range Not Satisfiable #311

zhe4967 opened this issue Jun 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@zhe4967
Copy link

zhe4967 commented Jun 13, 2024

如果文件下载完成,但是由于某种原因没有记录Cache,下次重新下载此文件,导致报错。
Create 函数里面
if (fileLength >= fileBytes)
{
if (File.Exists(_tempFilePath))
File.Delete(_tempFilePath);
fileLength = -1; // 这里赋值-1,避免下文webRequest.SetRequestHeader("Range" ***** 超出服务器文件大小
}

@gmhevinci gmhevinci added the bug Something isn't working label Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants