diff options
Diffstat (limited to 'src/com/vaadin/service')
-rw-r--r-- | src/com/vaadin/service/FileTypeResolver.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/com/vaadin/service/FileTypeResolver.java b/src/com/vaadin/service/FileTypeResolver.java index 599cce924f..566f299376 100644 --- a/src/com/vaadin/service/FileTypeResolver.java +++ b/src/com/vaadin/service/FileTypeResolver.java @@ -245,7 +245,13 @@ public class FileTypeResolver implements Serializable { dotIndex++; if (fileName.length() > dotIndex) { - final String ext = fileName.substring(dotIndex); + String ext = fileName.substring(dotIndex); + + // Ignore any query parameters + int queryStringStart = ext.indexOf('?'); + if (queryStringStart > 0) { + ext = ext.substring(0, queryStringStart); + } // Return type from extension map, if found final String type = (String) extToMIMEMap.get(ext); |