summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLOfflineStorage.h
diff options
context:
space:
mode:
authorChris Loer <chris.loer@gmail.com>2018-10-17 10:43:58 -0700
committerChris Loer <chris.loer@mapbox.com>2018-10-17 12:53:24 -0700
commitaab55cfbcdbcdea3610beb5f02d276d2e417cedb (patch)
treec1998925d0c96da7b11ce2c9121b8b263b5168ce /platform/darwin/src/MGLOfflineStorage.h
parentc66f92f4529b25d031f9c93687761647c48d8ae8 (diff)
downloadqtlocation-mapboxgl-aab55cfbcdbcdea3610beb5f02d276d2e417cedb.tar.gz
[darwin,test] Add "must-revalidate" support to putResourceWithURL
Testing must-revalidate: true required an expiration date in the future, which exposed a round-tripping problem from translating NSDate to time_point based on now(). Use epoch of 1970 instead (although technically it's not guaranteed to be the epoch for system_clock until C++20)
Diffstat (limited to 'platform/darwin/src/MGLOfflineStorage.h')
-rw-r--r--platform/darwin/src/MGLOfflineStorage.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/platform/darwin/src/MGLOfflineStorage.h b/platform/darwin/src/MGLOfflineStorage.h
index 5065e397d0..415df84646 100644
--- a/platform/darwin/src/MGLOfflineStorage.h
+++ b/platform/darwin/src/MGLOfflineStorage.h
@@ -355,8 +355,9 @@ MGL_EXPORT
* @param modified Optional "modified" response header
* @param expires Optional "expires" response header
* @param etag Optional "entity tag" response header
+ * @param mustRevalidate Indicates whether response can be used after it's stale
*/
--(void)putResourceWithUrl:(NSURL *)url data:(NSData *)data modified:(NSDate * _Nullable)modified expires:(NSDate * _Nullable)expires etag:(NSString * _Nullable)etag;
+-(void)putResourceWithUrl:(NSURL *)url data:(NSData *)data modified:(NSDate * _Nullable)modified expires:(NSDate * _Nullable)expires etag:(NSString * _Nullable)etag mustRevalidate:(BOOL)mustRevalidate;
@end