Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HttpResponse getCacheControlMaxAge 返回值用int过小 #12

Closed
at15 opened this issue Nov 1, 2014 · 1 comment
Closed

HttpResponse getCacheControlMaxAge 返回值用int过小 #12

at15 opened this issue Nov 1, 2014 · 1 comment

Comments

@at15
Copy link

at15 commented Nov 1, 2014

比如缓存一个月的话 maxAge = 30 * 24 * 60 * 60 = 2592000
然后 maxAge * 1000 就超过了int的范围变成了负数,然后expireTime就永远在当前时间之前了.缓存就永远失败了.

https://github.com/Trinea/android-common/blob/master/src/cn/trinea/android/common/entity/HttpResponse.java

232 行改成long应该就可以了吧? 否则267行那里就会导致 maxAge * 1000 变成 -1702967296

@Trinea
Copy link
Owner

Trinea commented Nov 3, 2014

已修改,这类问题你可以直接提交 pr,https://help.github.com/articles/syncing-a-fork/

@Trinea Trinea closed this as completed Nov 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants