Filedownloader: Connection failed with request[{Range=[bytes=-474921016-399245915]}],下载5G文件,下载了1G多,然后暂停再继续失败,应该是分片错了

Created on 11 Oct 2017  ·  7Comments  ·  Source: lingochamp/FileDownloader

Before Issue

  1. Please search on the Issues
  2. Please search on the wiki
  3. Please set FileDownloadLog.NEED_LOG=true and review the Logcat output from main process and :filedownloader process ( pay attention to Warn and Error level logcat)

Issue

  1. What problem do you get?
  2. Which version of FileDownloader are you using when you produce such problem?
  3. How to reproduce such problem?
  4. Do you set FileDownloadLog.NEED_LOG=true?
  5. Could you please reproduce this problem and provide all main process and :filedownloader process logcat
  6. Can you fix it by yourself and request PR, if not, what's problem do you get when you try to fix it

P.S. If you don't know how to get :filedownloader process, it's recommended to using pidcat to just filter all your application logcat, or define process.non-separate=true on filedownloader.properties


请在Issue前认真的跟进上面提到的建议,这样将可以极大的加快你遇到问题的处理。

bug

Most helpful comment

DefaultDatabaseImpl类的findConnectionModel方法中

model.setStartOffset(c.**getInt**(c.getColumnIndex(ConnectionModel.START_OFFSET)));
model.setCurrentOffset(c.**getInt**(c.getColumnIndex(ConnectionModel.CURRENT_OFFSET)));
model.setEndOffset(c.**getInt**(c.getColumnIndex(ConnectionModel.END_OFFSET)));

我改成getLong就ok了

All 7 comments

Connection failed with request[{Range=[bytes=-474921016-399245915]}] response[{null=[HTTP/1.1 416 Requested Range Not Satisfiable], Connection=[close], Content-Length=[213], Content-Range=[bytes */5867766516], Content-Type=[text/html], Date=[Wed, 11 Oct 2017 09:20:44 GMT], Server=[nginx/1.9.12], X-Android-Received-Millis=[1507713645213], X-Android-Response-Source=[NETWORK 416], X-Android-Sent-Millis=[1507713645191]}] http-state[416] on task[-1632494122-3], which is changed after verify connection, so please try again

使用的是哪个版本?

1.6.6

@hongbiangoal 确定清楚版本,这个问题在 #669 中修复过,我刚刚重新检查了代码,在1.6.2之后就不可能再遇到该问题。

有任何反馈该Issue将被重新打开。

DefaultDatabaseImpl类的findConnectionModel方法中

model.setStartOffset(c.**getInt**(c.getColumnIndex(ConnectionModel.START_OFFSET)));
model.setCurrentOffset(c.**getInt**(c.getColumnIndex(ConnectionModel.CURRENT_OFFSET)));
model.setEndOffset(c.**getInt**(c.getColumnIndex(ConnectionModel.END_OFFSET)));

我改成getLong就ok了

@hongbiangoal 抱歉,确实存在该问题,我这边会提交一个新版本修复这个问题。


也十分欢迎直接提交PR的~

Was this page helpful?
0 / 5 - 0 ratings