fix url loader bug with querysrtings #547

This commit is contained in:
Julien Bouquillon 2012-08-08 01:09:57 +02:00
parent 93b6622d21
commit df3beb9e3c
1 changed files with 4 additions and 0 deletions

View File

@ -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.