Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[ios, macos] Fixed receiving local file URL response
Browse files Browse the repository at this point in the history
  • Loading branch information
1ec5 committed Apr 24, 2020
1 parent 3542db4 commit cb3d9ea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@

By default, the source is not volatile.

### Bug fixes

- [ios, macos] Fixed error receiving local file URL response ([#16428](https://github.com/mapbox/mapbox-gl-native/pull/16428))

## maps-v1.6.0-rc.1

### ✨ New features
Expand Down
2 changes: 2 additions & 0 deletions platform/darwin/src/http_file_source.mm
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,8 @@ BOOL isValidMapboxEndpoint(NSURL *url) {
std::make_unique<Error>(Error::Reason::Other, std::string{ "HTTP status code " } +
std::to_string(responseCode));
}
} else if ([url isFileURL]) {
response.data = std::make_shared<std::string>((const char *)[data bytes], [data length]);
} else {
// This should never happen.
response.error = std::make_unique<Error>(Error::Reason::Other,
Expand Down

0 comments on commit cb3d9ea

Please sign in to comment.