Bug 54527 - Synchronize conf/web.xml mime mapping with Tomcat 7
Summary: Synchronize conf/web.xml mime mapping with Tomcat 7
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 6
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 6.0.36
Hardware: All All
: P2 enhancement (vote)
Target Milestone: default
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-05 14:41 UTC by Michael Osipov
Modified: 2013-04-27 13:12 UTC (History)
0 users



Attachments
Patch against Tomcat 6.0 trunk (137.38 KB, patch)
2013-02-13 21:36 UTC, Michael Osipov
Details | Diff
Proposed patch (131.82 KB, patch)
2013-02-18 13:41 UTC, Mark Thomas
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Osipov 2013-02-05 14:41:31 UTC
The mime-mapping of conf/web.xml in Tomcat 7 ist far more complete than in Tomcat 6 [1]. Please keep both sections synchronized. It's quite a tedious work to create a suitable patch with every release and apply that to Tomcat 6.

[1] svn diff http://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk/conf/web.xml  http://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk/conf/web.xml
Comment 1 Konstantin Kolinko 2013-02-05 21:54:01 UTC
AFAIK, Nothing is broken with the current list of mime-mappings in Tomcat 6, so I am marking this as enhancement.

Several notes

1. web.xml in Tomcat 7 is 100 kilobytes larger than the one in Tomcat 6.

I wouldn't be wondered if the time to parse those additional 3000 lines and the memory used to store the mappings for each deployed application were noticeable in some configurations.

2. There is nothing wrong with having your own copy of web.xml to replace the one provided by Tomcat.

I would not expect many changes to the default web.xml in Tomcat 6, so you do not need to update your copy.

3. Tomcat 6 is RTC, so someone has to prepare the actual patch to be proposed for a vote.


Personally, I think it is too late to backport such enhancement to Tomcat 6. Though if anyone else goes with it, I wouldn't mind. Maybe ask on opinions on dev@.

Are there any more requests for this?
Comment 2 Michael Osipov 2013-02-05 22:16:13 UTC
(In reply to comment #1)
> AFAIK, Nothing is broken with the current list of mime-mappings in Tomcat 6,
> so I am marking this as enhancement.

Sorry, I did not mind to file a bug actually. This is a enhancement of course.
 
> Several notes
> 
> 1. web.xml in Tomcat 7 is 100 kilobytes larger than the one in Tomcat 6.
> 
> I wouldn't be wondered if the time to parse those additional 3000 lines and
> the memory used to store the mappings for each deployed application were
> noticeable in some configurations.

This happens anyway if you run an app with Tomcat 7. Why this should make a difference to Tomcat 6?
 
> 2. There is nothing wrong with having your own copy of web.xml to replace
> the one provided by Tomcat.

I know, I have done this partially. But it has a huge drawback. Everyone has to do the same stupid work over and over again, patch, check, patch, etc. We can do this in a single place, here.
 
> I would not expect many changes to the default web.xml in Tomcat 6, so you
> do not need to update your copy.
> 
> 3. Tomcat 6 is RTC, so someone has to prepare the actual patch to be
> proposed for a vote.
> 
> 
> Personally, I think it is too late to backport such enhancement to Tomcat 6.
> Though if anyone else goes with it, I wouldn't mind. Maybe ask on opinions
> on dev@.

What is RTC? Yes, I will raise this on dev@ as you advise.

Спасибо Костя!
Comment 3 Michael Osipov 2013-02-13 21:36:51 UTC
Created attachment 29952 [details]
Patch against Tomcat 6.0 trunk
Comment 4 Mark Thomas 2013-02-18 13:40:12 UTC
The proposed patch creates duplicate definitions for:
htke, odft, oti, svc, svd, text, tfi, tfm, tga, thmx, s, s3m, saf, sbml, sc, scd, scm, scq, scs, scurl, sda, sdc, sdd, sdkd, sdkm, sdp, sdw, see, seed, sema, semd, semf, ser, setpay, setreg, sfd-hdstx, sfs, sfx, sgi, sgl, sgm, sgml

I'll have an updated proposal shortly.
Comment 5 Mark Thomas 2013-02-18 13:41:37 UTC
Created attachment 29962 [details]
Proposed patch

New patch that doesn't create the duplicates.
Comment 6 Mark Thomas 2013-02-18 13:43:09 UTC
Updated patch proposed for 6.0.x.
Comment 7 Konstantin Kolinko 2013-04-27 13:12:16 UTC
Fixed in 6.0 by r1476538 , will be in 6.0.37.