Solved

Internet Explorer wont recognise uppercase file extensions (Tomcat application)

Posted on 2016-08-18
7
60 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 83

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 83

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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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 83

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Evaluating Enterprise Antivirus solutions 2 40
Application timeout 4 44
.CSS HTML Help 3 26
SQL profiler 3 17
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
Learn how to PXE Boot both BIOS & UEFI machines with DHCP Policies and Custom Vendor Classes
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
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…

733 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