summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Wray <jason@mapbox.com>2019-08-14 16:23:39 -0700
committerJason Wray <jason@mapbox.com>2019-08-14 16:23:39 -0700
commit25a9d86966ce247a8df58328f94bade9b4584e6f (patch)
tree459ab056d8059cefc6ce70ccab709e3f5b7ba28e
parent48fd0e3ef50e3727b25e930855aaef8c46870eab (diff)
downloadqtlocation-mapboxgl-25a9d86966ce247a8df58328f94bade9b4584e6f.tar.gz
Simplify SKU token append
-rw-r--r--platform/darwin/src/http_file_source.mm3
1 files changed, 1 insertions, 2 deletions
diff --git a/platform/darwin/src/http_file_source.mm b/platform/darwin/src/http_file_source.mm
index b1f2bfbb91..c2ed065ed8 100644
--- a/platform/darwin/src/http_file_source.mm
+++ b/platform/darwin/src/http_file_source.mm
@@ -205,14 +205,13 @@ NSURL *resourceURLWithAccountType(const Resource& resource, NSInteger accountTyp
if (accountType == 0 &&
([url.host isEqualToString:@"mapbox.com"] || [url.host hasSuffix:@".mapbox.com"])) {
NSURLComponents *components = [NSURLComponents componentsWithURL:url resolvingAgainstBaseURL:NO];
- NSURLQueryItem *accountsQueryItem = [NSURLQueryItem queryItemWithName:@"sku" value:MGLAccountManager.skuToken];
NSMutableArray *queryItems = [NSMutableArray array];
if (resource.usage == Resource::Usage::Offline) {
[queryItems addObject:[NSURLQueryItem queryItemWithName:@"offline" value:@"true"]];
} else {
// Only add SKU token to requests not tagged as "offline" usage.
- [queryItems addObject:accountsQueryItem];
+ [queryItems addObject:[NSURLQueryItem queryItemWithName:@"sku" value:MGLAccountManager.skuToken]];
}
if (components.queryItems) {