mapbox / mapbox-gl-native

Interactive, thoroughly customizable maps in native Android, iOS, macOS, Node.js, and Qt applications, powered by vector tiles and OpenGL
https://mapbox.com/mobile
Other
4.36k stars 1.33k forks source link

[qt] Ignore status code with 'data' scheme URLs #16437

Closed ntadej closed 4 years ago

ntadej commented 4 years ago

Users might want to add image sources from a Qt application using base64 encoded image using the data URL scheme. This is supported by Qt but HTTP status code is not present. This adds a special case to the HTTPRequest::handleNetworkReply.

I could not think of any other scheme that could be reasonably used here. HTTP and file:// seem to report the status code properly.

Will also provide MR to master when this one is accepted. Let me know if this should be done to master first.