Giter Club home page Giter Club logo

Comments (6)

jiahuifu avatar jiahuifu commented on July 30, 2024

唯一标识是url

发自我的 iPhone

在 2015年11月24日,12:46,zwstyle [email protected] 写道:


Reply to this email directly or view it on GitHub.

from multithreaddownloader.

AigeStudio avatar AigeStudio commented on July 30, 2024

给我看你的下载地址

from multithreaddownloader.

zwstyle avatar zwstyle commented on July 30, 2024

我试的几个文件都不行,http://bolome.oss-cn-hangzhou.aliyuncs.com/android/officalsite/boloclient-officalsite_pro-release-2015103020-v2.6-20151104160000.apk,你试下这个链接,反复暂停和开始,返回的数据就不对了,进度也会超过100%,我调试了好久也没有看出是什么原因

from multithreaddownloader.

zwstyle avatar zwstyle commented on July 30, 2024

@AigeStudio 是这个下载链接的问题吗?

from multithreaddownloader.

zwstyle avatar zwstyle commented on July 30, 2024

目前发现单线程不会出现问题,多线程出现问题

from multithreaddownloader.

zwstyle avatar zwstyle commented on July 30, 2024

问题已经找到了,是因为有些服务器对发起的Range格式请求响应数据不一样,有一些服务器必须明确指定下载范围,并且下载范围不能大于文件大小,如果指定下载范围大于文件大小,则返回200,而不是206,目前阿里云的oss服务器就是这样返回的。
在DLTask类的dlDispatch方法中,在计算最后一个线程下载的大小时,多计算了一个字节,导致最后一个线程下载的数据不对,将 end = start + threadLength + remainder; 改为 end = start + threadLength + remainder - 1;便可以正常下载了。

from multithreaddownloader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.