I tend to agree with Alfred that it's better to patch this than to leave it like it is. Ok, what do others think?
Carsten Alfred Nathaniel wrote: > Currently in 2.1.x mime type setting on reader instances does not work. > > <map:match pattern="foo.bar"> > <map:read src="foo.html" mime-type="text/plain"/> > </map:match> > > returns Content-type: text/html because the <mime-mapping> for *.html in > web.xml always wins over the mime-type attributed. > > This behaviour has been reported in [1] and Carsten looked at it at the > 2003 Hackathon [2]. In a speed vote [3] it was decided to fix it only > in 2.2. > > The arguments for not putting it into 2.1.x were: > > a) it is incompatible [4] > b) no one really missed it [5] > > Argument a) does not really hold. It only affects people who currently > specify a mime-type different from the file extension and trust that it > is blissfully ignored. > > Argument b) is also no longer valid. Besides the original [1] there are > > http://issues.apache.org/bugzilla/show_bug.cgi?id=25121 > http://issues.apache.org/bugzilla/show_bug.cgi?id=26997 > http://issues.apache.org/bugzilla/show_bug.cgi?id=31321 > > relating to the same problem. > > Backpatching should be straightforward. AFAIKS only > AbstractProcessingPipeline.setMimeTypeForReader and > setMimeTypeForSerializer must be copied from trunk to 2.1.x. (SVN merge > cannot be used because there were too many changes in both branches). > > If you agree to do the change, I am willing to provide the patch. > > WDYT? > > Cheers, Alfred. > > > [1] http://issues.apache.org/bugzilla/show_bug.cgi?id=10277 > [2] http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=106578053525561&w=2 > [3] http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=106672187330479&w=2 > [4] http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=106672955104930&w=2 > [5] http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=106673000205400&w=2 > > > -- Carsten Ziegeler - Open Source Group, S&N AG http://www.s-und-n.de http://www.osoco.org/weblogs/rael/
