CesiumGS / cesium-native

Apache License 2.0
402 stars 205 forks source link

Fix parsing of protocol-relative URIs #864

Closed azrogers closed 3 months ago

azrogers commented 4 months ago

As noted on the forums and documented in CesiumGS/cesium-unity#455, some Ion imagery assets provide protocol-relative URLs for their content. While this is technically supported by the RFC 3986 standard, our URI parsing library chokes on them. This change makes cesium-native prepend https to these URLs, meaning this imagery can be loaded in Unreal and Unity again. Technically, the protocol should be the same as the URL the content was loaded from - but that's a more complex change, and the only place we've seen this problem crop up is over ion, where all requests would be https anyways.