Solved

Internet Explorer wont recognise uppercase file extensions (Tomcat application)

Posted on 2016-08-18
7
76 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
Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

 

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

Turn Insights Into Action

You’ve already invested in ITSM tools, chat applications, automation utilities, and more. Fortify these solutions with intelligent communications so you can drive business processes forward.

With xMatters, you'll never miss a beat.

Question has a verified solution.

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

Determining the an SCCM package name from the Package ID
Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

696 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