Commit c2bca8bf authored by Nicolas Delaby's avatar Nicolas Delaby

Use glob matching only of wilcard is at the end of string.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41501 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 92af4735
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
from Products.ERP5Type.Cache import CachingMethod\n from Products.ERP5Type.Cache import CachingMethod\n
\n \n
def contentTypeMatch(content_type, glob):\n def contentTypeMatch(content_type, glob):\n
if \'*\' in glob:\n if \'*\' == glob[-1]:\n
# \'image/png\' must match \'image/*\'\n # \'image/png\' must match \'image/*\'\n
index = glob.index(\'*\')\n index = glob.index(\'*\')\n
return content_type[:index] == glob[:index]\n return content_type[:index] == glob[:index]\n
......
1225 1226
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment