?
Solved

Internet Explorer wont recognise uppercase file extensions (Tomcat application)

Posted on 2016-08-18
7
Medium Priority
?
104 Views
Last Modified: 2016-08-29
I have a Ubuntu server running apache webserver and Tomcat; also Win7 client + IE11, FF, Chrome:

I understand that, as Ubuntu (Linux) differs upper from lowercase, it does make a diffence from default.jpg to default.JPG ..

Now in our Tomcat application thumbnails of *.JPG do not show up, but only in Internet Explorer (11).
Chrome and Firefox seem to not care very much - no problems.

So I guess I have to add the uppercase MIME types to the web.xml - but I would like to know, why/how IE handles MIME Types differently to other browsers?
Of couse, it is strongly entagled with Windows OS which itself also does not differ upper and lowercase.. So is the root cause of this, how the mime types are defined (in the registry?) and processed by different browsers (Chrome/FF handling MIME types on their own)?

Can somebody confirm this and/or give a more detailed reason?
0
Comment
Question by:Systemadministration
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 41762073
That is very odd.  I have never had that happen.  The web server is the thing that recognizes the file names, the browser just sends them in the request.  I don't think there are 'uppercase MIME' types.  Can you give some sample files links that are loaded differently by IE and the other browsers?
0
 

Assisted Solution

by:Systemadministration
Systemadministration earned 0 total points
ID: 41762086
Thanks for you comment.
Well, as Linux machines (= our webb/app server) are case sensitive. So are the MIME types:
http://stackoverflow.com/questions/9575756/servlet-for-file-upload-contenttype-returning-none-when-file-extension-in-ca
---
I can give more than an example, this is the network traffic logged by IE, see attachment.
---
So to fix this I would need to define uppercase MIME types in my tomcat web.xml.
But I would like to know, why IE handles this differently from Chrome/FF.
If I was very mean I would say: "Once again IE seems more stupid than any other browser"..
2016-08-19-09_43_19-Clipboard-johnen.jpg
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 41762141
Several things.  You are having a problem with file extensions, not MIME types.  They are not the same.  Here is the 'official' list of MIME types:  https://www.iana.org/assignments/media-types/media-types.xhtml

If the 'mime-mapping' works for you, use it.  But that is an artifact of Tomcat and/or JAVA.
<mime-mapping>
    <extension>JPG</extension>
    <mime-type>image/jpeg</mime-type>
</mime-mapping>

Open in new window


There is no reason for IE and Firefox to be acting differently that I know of.  On my Linux Apache sites, they don't act differently.  Maybe if you capture the headers from both you will see a difference.
0
Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

 

Accepted Solution

by:
Systemadministration earned 0 total points
ID: 41762163
That's hair-splitting now :)
Case-sensitve handling of file extensions causing running into indefined MIME types..
--
I noticed another thing, which might make a difference - you couldn't see on the first screenshot:
The image URL is like:
.../default.jpg?version=1471527238374&name=uppercase.JPG
resp.
.../default.jpg?version=1471527238374&name=lowercase.jpg
--
Maybe Chrome and FF interpret the MIME type from "default.jpg" => ignoring the paramters and following extensions;
While IE takes "the last file extension it gets" => causing the difference of upper and lowercase...(?)
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 41762247
All that is possible.  I think the difference is Tomcat and whatever goes on there.  I don't have any experience with Tomcat.  My experience with hundreds of pages on Linux and Apache have never shown IE to have this problem.  But I also have never used URLs like that.  The only time I see URLs like that are when the first file name is actually a program and not an image.
0
 

Author Comment

by:Systemadministration
ID: 41766370
Well I guess if there is noone else with a comparable scenario responding, I will stick with my assumptions, even though it's slightly unsatisfying..
0
 

Author Closing Comment

by:Systemadministration
ID: 41774474
Other comments did not bring in further/additional information.
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question