Solved

Internet Explorer wont recognise uppercase file extensions (Tomcat application)

Posted on 2016-08-18
7
23 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
  • 4
  • 3
7 Comments
 
LVL 82

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 82

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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

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 82

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

Too many email signature updates to deal with?

Do you feel like you are taking up all of your time constantly visiting users’ desks to make changes to email signatures? Wish you could manage all signatures from one central location, easily design them and deploy them quickly to users? Well, there is an easy way!

Join & Write a Comment

Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

760 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now