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.35k stars 1.33k forks source link

[qt] Ignore status code with 'data' URLs #16491

Closed ntadej closed 3 years ago

ntadej commented 4 years ago

This is a master equivalent of #16437.

Original text:

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.

stale[bot] commented 3 years ago

This pull request has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.

ntadej commented 3 years ago

@tmpsantos, should this be merged into master or not?

tmpsantos commented 3 years ago

I'm OK with that, do you mind rebasing and adding a test?

tmpsantos commented 3 years ago

But also happy to keep it only to the qt-staging branch (that is used by the QML plugin).