summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Johnson <wibge@gmail.com>2017-01-30 16:27:31 -0800
committerAnna Johnson <wibge@gmail.com>2017-01-30 16:35:40 -0800
commit13ce325f6d9bc3d80898255f281f6517c05e8bdb (patch)
tree960a1c8062f81b652bcd4da92726fa052ab5ecc6
parent7637b85a07a95479c1ad8dd1026ad3bec0a01cd5 (diff)
downloadqtlocation-mapboxgl-13ce325f6d9bc3d80898255f281f6517c05e8bdb.tar.gz
handle 403s same as 404s when downloading tiles
-rw-r--r--platform/darwin/src/http_file_source.mm3
1 files changed, 2 insertions, 1 deletions
diff --git a/platform/darwin/src/http_file_source.mm b/platform/darwin/src/http_file_source.mm
index f4b2f8af01..58cf3deb11 100644
--- a/platform/darwin/src/http_file_source.mm
+++ b/platform/darwin/src/http_file_source.mm
@@ -287,7 +287,8 @@ std::unique_ptr<AsyncRequest> HTTPFileSource::request(const Resource& resource,
if (responseCode == 200) {
response.data = std::make_shared<std::string>((const char *)[data bytes], [data length]);
- } else if (responseCode == 204 || (responseCode == 404 && resource.kind == Resource::Kind::Tile)) {
+ } else if (responseCode == 204 ||
+ ((responseCode == 404 || responseCode == 403) && resource.kind == Resource::Kind::Tile)) {
response.noContent = true;
} else if (responseCode == 304) {
response.notModified = true;