Merge pull request #620 from revolunet/imagefix

fix url loader bug with querysrtings #547
This commit is contained in:
Mathieu Virbel 2012-08-09 03:38:32 -07:00
commit 63db7bfc8c
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.