summaryrefslogtreecommitdiff
path: root/test/storage/default_file_source.test.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [core] make forcing cache/network only more explicitKonstantin Käfer2017-10-121-13/+13
| | | | | | Previously, we used the existence of a `prior*` field in the Resource object as an indication for whether we should consult the cache or not. However, this is prone to error, since a failed cache lookup won't set any prior fields. Therefore, we manually set `priorExpires` to 0. This in turn triggered another bug where generated wrong expiration timestamps when the server response we got was expired (or expired between sending and receiving). This commit changes the flags so that we can now explicitly request CacheOnly/NetworkOnly (or All) loading methods, rather than the implicit Optional/Required naming scheme.
* [core] fix loading of stale must-revalidate resourcesKonstantin Käfer2017-09-251-0/+78
| | | | | | In https://github.com/mapbox/mapbox-gl-native/pull/9670, we implemented support for the Cache-Control: must-revalidate header. While we now respect this header and don't show resources that are stale and have this header set, the optional cache request never completes. This means we're also never going to try to actually get a fresh tile and just never show this tile anymore. This commit fixes this by responding with a Not Found error when the resource is unusable (= stale and has must-revalidate set). Since we actually still have the data (but can't use it due to caching rules), we're responding with the data as well. To avoid a second cache hit, tile_loader_impl.hpp now passes on the data from the Optional to the Required request so that it can be reused when we get a 304 Not Modified response from the server.
* [core] finish must-revalidate supportKonstantin Käfer2017-08-081-32/+78
|
* [core] Use the ResourceTransform instead of callbacksThiago Marcos P. Santos2017-06-261-3/+22
| | | | | Based on the actor model, can be considered safer to use since we don't need to worry about object lifetime anymore.
* [core] Cache file source base URL and access tokenJesse Bounds2017-03-011-0/+16
| | | | | This caches the base URL and access token values when they are set so that they can still be retrieved even when the thread is paused.
* [test] add unit test for DefaultFileSource::setResourceTransform()Konstantin Käfer2017-02-201-0/+30
|
* [test] add .test.cpp suffix to test case filesKonstantin Käfer2016-09-281-0/+462