lingochamp / FileDownloader

Multitask、MultiThread(MultiConnection)、Breakpoint-resume、High-concurrency、Simple to use、Single/NotSingle-process
Apache License 2.0
11.02k stars 2.19k forks source link

1.7.5 . totalBytes一直为-1 #1085

Open tozhangxy opened 6 years ago

tozhangxy commented 6 years ago

我在服务器端代码设置 response.setContentLength((int)file.length()); response.setHeader("Content-Range", String.valueOf( file.length()));

但是1.7.5版本里 protected void progress(BaseDownloadTask task, int soFarBytes, int totalBytes) {} totalBytes一直为-1 ,

但是1.6.9版本里能获取到totalBytes。 为什么?

rantianhua commented 6 years ago

请提供 FileDownloader 的日志。

tozhangxy commented 6 years ago

08-05 15:34:12.825 6420-7403/filedownloader W/FileDownloader.FileDownloadUtils: don't get instance length fromContent-Range header 08-05 15:34:24.040 6420-7586/com.xx:filedownloader W/FileDownloader.FileDownloadUtils: don't get instance length fromContent-Range header

rantianhua commented 6 years ago

@tozhangxy 请提供完整的,你只提供了这部分,丢失了很多上下文信息,你不用管哪些是有用的,都贴上来就好。