Skip to content
This repository was archived by the owner on Jun 7, 2024. It is now read-only.
This repository was archived by the owner on Jun 7, 2024. It is now read-only.

raw.fastgit.org出现下载不完整的情况 #31

@Strelizia02

Description

@Strelizia02

代码中使用
URL u = new URL(“https://raw.fastgit.org/xxx”);
HttpURLConnection httpUrl;
httpUrl.getInputStream();FileOutputStream;
在网络情况不良的情况下,不会反回连接超时,而是直接返回成功,但实际下载文件不完整。

类似情况:
1.在使用raw.fastgit.org下载超过3M的文本文件时,会出现在文件中间截断并且返回下载成功的信息。
2.使用手机4g访问大文件时,也有一定概率出现文件被截断的情况。

大文件示例:https://raw.fastgit.org/yuanyan3060/Arknights-Bot-Resource/master/gamedata/levels/enemydata/enemy_database.json

正常文件结尾:
image

异常文件结尾(手机访问):
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions