Merge branch 'master' of https://github.com/mapbox/mapbox-gl-native into android-mason
Conflicts: gyp/common.gypi include/mbgl/geometry/vao.hpp include/mbgl/platform/event.hpp include/mbgl/platform/gl.hpp platform/default/http_request_baton_curl.cpp src/storage/response.cpp
This commit is contained in:
@@ -6,10 +6,10 @@ namespace mbgl {
|
||||
|
||||
int64_t Response::parseCacheControl(const char *value) {
|
||||
if (value) {
|
||||
uint64_t seconds = 0;
|
||||
unsigned long long seconds = 0;
|
||||
// TODO: cache-control may contain other information as well:
|
||||
// http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9
|
||||
if (std::sscanf(value, "max-age=%llu", reinterpret_cast<unsigned long long *>(&seconds)) == 1) {
|
||||
if (std::sscanf(value, "max-age=%llu", &seconds) == 1) {
|
||||
return std::chrono::duration_cast<std::chrono::seconds>(
|
||||
std::chrono::system_clock::now().time_since_epoch()).count() +
|
||||
seconds;
|
||||
|
||||
Reference in New Issue
Block a user