Repository navigation
mapbox: URL containing query string causes infinite loop - #5554
Conversation
| mbgl::util::mapbox::normalizeSourceURL("mapbox://user.map", "key")); | ||
| EXPECT_EQ( | ||
| "http://path", | ||
| mbgl::util::mapbox::normalizeSourceURL("http://path", "key"); |
There was a problem hiding this comment.
This line is missing a closing parenthesis.
|
Should be OK now. @1ec5 |
|
Verified that the tests build and pass locally. Thanks for the fix! |
|
I checked that the implement in |
|
Note that my development environment is an Ubuntu server VM on Windows 10. Mapbox-gl-native can not run on my VM, it is a bit of un-convenient to test my modification |
|
Unfortunately, I’m not very familiar with our Linux build support, but here are instructions in case you haven’t seen them. Otherwise, another option might be to build the Android SDK on Linux, although that’s a bit further removed from the code you’re working with. |
|
Updated the iOS and macOS changelogs in a53dfcd. |
* correct all EXPECT_EQ(actual, expected) to EXPECT_EQ(expected, actual) * fix getMapboxURLPathname() of URL with querystring * add test for normalizeSourceURL of non-mapbox protocal * Update mapbox.cpp Cherry-picked from e82ecc6.
If
getMapboxURLPathnameparse a url with querystring, such asmapbox://p/a/t/h?query=aa, an infinite loop happens and crash your computer. This is a serious bug which will affect all platforms. You should fix it ASAP!