summaryrefslogtreecommitdiff
path: root/platform/darwin/src/http_file_source.mm
diff options
context:
space:
mode:
Diffstat (limited to 'platform/darwin/src/http_file_source.mm')
-rw-r--r--platform/darwin/src/http_file_source.mm2
1 files changed, 2 insertions, 0 deletions
diff --git a/platform/darwin/src/http_file_source.mm b/platform/darwin/src/http_file_source.mm
index 1b5a67ea5d..c69abccff9 100644
--- a/platform/darwin/src/http_file_source.mm
+++ b/platform/darwin/src/http_file_source.mm
@@ -371,6 +371,8 @@ std::unique_ptr<AsyncRequest> HTTPFileSource::request(const Resource& resource,
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,