From df3beb9e3c92a228027dca8aa058d4b651e36e5f Mon Sep 17 00:00:00 2001 From: Julien Bouquillon Date: Wed, 8 Aug 2012 01:09:57 +0200 Subject: [PATCH] fix url loader bug with querysrtings #547 --- kivy/core/image/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kivy/core/image/__init__.py b/kivy/core/image/__init__.py index c53716658..4ab78ef93 100644 --- a/kivy/core/image/__init__.py +++ b/kivy/core/image/__init__.py @@ -316,6 +316,10 @@ class ImageLoader(object): # extract extensions ext = filename.split('.')[-1].lower() + # prevent url querystrings + if filename.startswith((('http://', 'https://'))): + ext = ext.split('?')[0] + # special case. When we are trying to load a "zip" file with image, we # will use the special zip_loader in ImageLoader. This might return a # sequence of images contained in the zip.