diff --git a/core/include/tangram/util/url.h b/core/include/tangram/util/url.h index e9ffb856c7..dabfd303b6 100644 --- a/core/include/tangram/util/url.h +++ b/core/include/tangram/util/url.h @@ -131,7 +131,7 @@ class Url { // parts describes URL components by their location within the buffer. struct Parts { struct Range { - uint16_t start = 0, count = 0; + size_t start = 0, count = 0; } scheme, location, path, parameters, query, fragment, media, data; } parts; diff --git a/core/src/util/url.cpp b/core/src/util/url.cpp index caa01c8193..06581ff45d 100644 --- a/core/src/util/url.cpp +++ b/core/src/util/url.cpp @@ -2,6 +2,7 @@ #include #include +#include namespace Tangram { @@ -320,6 +321,10 @@ std::string Url::removeDotSegmentsFromString(std::string path) { } void Url::parse() { +#ifdef TANGRAM_WINDOWS + // Normalize Windows paths. Chromium also does this. + std::replace(buffer.begin(), buffer.end(), '\\', '/'); +#endif // The parsing process roughly follows https://tools.ietf.org/html/rfc1808#section-2.4