Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix url loader bug with querysrtings #547 #620

Merged
merged 1 commit into from Aug 9, 2012
Merged

Conversation

revolunet
Copy link
Contributor

check if image is http(s) based then removed the eventual querystring before checking file extension

@rubik
Copy link

rubik commented Aug 8, 2012

Well I thought that if there was another ? before the one you want to split urlparse threw an error, but it actually parses it wrong. So sorry for bothering with useless things.

@revolunet
Copy link
Contributor Author

i think this is not possible :/

@hansent
Copy link
Contributor

hansent commented Aug 8, 2012

at least a correct url I think should only have one "?". but in general I don't think extension is guranteed to be there the way you think

Actually I have in the past used the fact that I can add extra query args to fake an extension for kivy. e.g.:
image is served dynamically at:
http://example.com/images/dynamic?w-100&h=100
so I can do:
http://example.com/images/dynamic?w-100&h=100&fake_ext=.png
and kivy will load is as png...

I think correct way is to look at or infer mimetype?

@revolunet
Copy link
Contributor Author

Yes extensions never guarantee anything;

We could also check mimetype if extension is not detected but thats another check, which need to read the response prior to load the correct loader.

tito added a commit that referenced this pull request Aug 9, 2012
fix url loader bug with querysrtings #547
@tito tito merged commit 63db7bf into kivy:master Aug 9, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants