summaryrefslogtreecommitdiff
path: root/platform/default/http_file_source.cpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2017-08-01 18:00:48 +0200
committerKonstantin Käfer <mail@kkaefer.com>2017-08-08 12:40:38 +0200
commitf0a7c45064c3ce3f509b1c2035fcaa07ccc35a99 (patch)
tree5813cfe2fd8e72cbf06f45990351b7412146c398 /platform/default/http_file_source.cpp
parent68f470fdda4e31d7704fba3e41bb2f899db39541 (diff)
downloadqtlocation-mapboxgl-f0a7c45064c3ce3f509b1c2035fcaa07ccc35a99.tar.gz
[core] finish must-revalidate support
Diffstat (limited to 'platform/default/http_file_source.cpp')
-rw-r--r--platform/default/http_file_source.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/platform/default/http_file_source.cpp b/platform/default/http_file_source.cpp
index 867d85fa4d..a9c442c2de 100644
--- a/platform/default/http_file_source.cpp
+++ b/platform/default/http_file_source.cpp
@@ -325,7 +325,9 @@ size_t HTTPRequest::headerCallback(char *const buffer, const size_t size, const
baton->response->etag = std::string(buffer + begin, length - begin - 2); // remove \r\n
} else if ((begin = headerMatches("cache-control: ", buffer, length)) != std::string::npos) {
const std::string value { buffer + begin, length - begin - 2 }; // remove \r\n
- baton->response->expires = http::CacheControl::parse(value.c_str()).toTimePoint();
+ const auto cc = http::CacheControl::parse(value.c_str());
+ baton->response->expires = cc.toTimePoint();
+ baton->response->mustRevalidate = cc.mustRevalidate;
} else if ((begin = headerMatches("expires: ", buffer, length)) != std::string::npos) {
const std::string value { buffer + begin, length - begin - 2 }; // remove \r\n
baton->response->expires = Timestamp{ Seconds(curl_getdate(value.c_str(), nullptr)) };