Skip to content

判断服务器文件是否修改的方法不是很理解啊 #15

Open

Description

@xunuosi

你好 这段代码注释写着判断服务器文件是否修改
/**
* 服务器文件是否已更改
*
* @PARAM response
* @return
*/
public static boolean isNotServerFileChanged(Response response) {
return response.code() == 206;
}
状态码206代表,客户端通过发送范围请求头Range抓取到了资源的部分数据。这个是如何判断服务器文件是否修改的?我的理解应该是比较两次下载时获取到的Last-Modified来判断文件是否修改吧。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions