You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Mark Thomas <ma...@apache.org> on 2019/12/04 18:02:16 UTC

Embedded and default MIME types

Hi all,

I was looking at this as an off-shoot of looking at BZ 63985.

Currently, there are 844 MIME mappings in conf/web.xml that are not
included in Tomcat.DEFAULT_MIME_MAPPINGS. Fixing it isn't too hard. The
844 figure comes from a unit test I could easily tweak to generate the
code needed to paste in to add these.

The question is, do we want to keep these in sync?

If the answer is yes I can get this fixed fairly quickly and add some
unit tests to ensure that they stay in sync.

Thoughts?

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Embedded and default MIME types

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Mark,

On 12/4/19 13:23, Mark Thomas wrote:
> On 04/12/2019 18:11, Christopher Schultz wrote:
>> Mark,
>> 
>> On 12/4/19 13:02, Mark Thomas wrote:
>>> Hi all,
>> 
>>> I was looking at this as an off-shoot of looking at BZ 63985.
>> 
>>> Currently, there are 844 MIME mappings in conf/web.xml that
>>> are not included in Tomcat.DEFAULT_MIME_MAPPINGS. Fixing it
>>> isn't too hard. The 844 figure comes from a unit test I could
>>> easily tweak to generate the code needed to paste in to add
>>> these.
>> 
>>> The question is, do we want to keep these in sync?
>> 
>>> If the answer is yes I can get this fixed fairly quickly and
>>> add some unit tests to ensure that they stay in sync.
>> 
>>> Thoughts?
>> 
>> What about reading them from a file instead of hard-coding them?
>> 
>> That same file can be used at build-time to generate the actual 
>> contents of the conf/web.xml that we ship as a binary.
> 
> We could. I'm not convinced the savings of only maintaining a
> single file going forwards is worth the extra work to do that.

So to reduce the amount of work to use a single file, we're going to
write a suite of unit tests to compare the two possibly diverging
sources? Seems like it's roughly equivalent both ways.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl3oCkIACgkQHPApP6U8
pFiIChAAi0uJF0GFws/dCd6EP61q5Wy5hWJTJokuhj0tRrIfNmtnS03D2jVqPIiG
i1fHTyeIvNqigY1dOcs+ImD+y4mjF2/dMPyzl7/lCgHjG5ERRD6UGs47oqWJYeXC
kXnm6OnJjBdVO4CtEm7MkQNzGD1YLfhDkunePyHKbuQE4MTYKEG04Sa3Rr9ukIbI
9H0tdhsT0n69ISTMZ7NyDm2Crk9X2tHTUUsZToc+y0xPUTsraxMD4VXfNPYGDW3w
16BIaOqMXyt9FxXfcwfMjtcRdjxGTGa0wFih7aojJfv5g+ErXOGMfTeU671Eaord
x30v9SSlvmxDaGVIxGms46nPG9ZI7mak4qyHJzcKeU/Ivd81mniE5Xq/p1/2QhsY
7+YT2EIobvXGFitzOBgSKDggWj8cvK5a2wKpdwwHssFA4wKN/w+gIybdA0Vgp3Hf
75QG3gzGYJGv0iCLNE6lXfBtL3X9UWbI0lfvhipIUYvEOB1hK5xknIeQUignKXZL
tT1qynyBXkCeG69yszaPAUkk2g0XS2oGRnE9YlfdaDdqqCNGE9Scwlap8Pra9ayj
Un0Ig8CbnUJeJ5VWKKpvGmh98i0HoeXHS53Tn4dC9A992uiO4zen5cxGSAN9WHfb
341bbqf8uoGUW+suQ14dL/0zBD600v/lynorR56V1T/QBGBKAQQ=
=RtcQ
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Embedded and default MIME types

Posted by Romain Manni-Bucau <rm...@gmail.com>.
+1 to align both, really reduces diff in tests and prod

Le mer. 4 déc. 2019 à 19:23, Mark Thomas <ma...@apache.org> a écrit :

> On 04/12/2019 18:11, Christopher Schultz wrote:
> > Mark,
> >
> > On 12/4/19 13:02, Mark Thomas wrote:
> >> Hi all,
> >
> >> I was looking at this as an off-shoot of looking at BZ 63985.
> >
> >> Currently, there are 844 MIME mappings in conf/web.xml that are
> >> not included in Tomcat.DEFAULT_MIME_MAPPINGS. Fixing it isn't too
> >> hard. The 844 figure comes from a unit test I could easily tweak to
> >> generate the code needed to paste in to add these.
> >
> >> The question is, do we want to keep these in sync?
> >
> >> If the answer is yes I can get this fixed fairly quickly and add
> >> some unit tests to ensure that they stay in sync.
> >
> >> Thoughts?
> >
> > What about reading them from a file instead of hard-coding them?
> >
> > That same file can be used at build-time to generate the actual
> > contents of the conf/web.xml that we ship as a binary.
>
> We could. I'm not convinced the savings of only maintaining a single
> file going forwards is worth the extra work to do that.
>
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>

Re: Embedded and default MIME types

Posted by Mark Thomas <ma...@apache.org>.
On 04/12/2019 18:11, Christopher Schultz wrote:
> Mark,
> 
> On 12/4/19 13:02, Mark Thomas wrote:
>> Hi all,
> 
>> I was looking at this as an off-shoot of looking at BZ 63985.
> 
>> Currently, there are 844 MIME mappings in conf/web.xml that are
>> not included in Tomcat.DEFAULT_MIME_MAPPINGS. Fixing it isn't too
>> hard. The 844 figure comes from a unit test I could easily tweak to
>> generate the code needed to paste in to add these.
> 
>> The question is, do we want to keep these in sync?
> 
>> If the answer is yes I can get this fixed fairly quickly and add
>> some unit tests to ensure that they stay in sync.
> 
>> Thoughts?
> 
> What about reading them from a file instead of hard-coding them?
> 
> That same file can be used at build-time to generate the actual
> contents of the conf/web.xml that we ship as a binary.

We could. I'm not convinced the savings of only maintaining a single
file going forwards is worth the extra work to do that.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Embedded and default MIME types

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Mark,

On 12/4/19 13:02, Mark Thomas wrote:
> Hi all,
> 
> I was looking at this as an off-shoot of looking at BZ 63985.
> 
> Currently, there are 844 MIME mappings in conf/web.xml that are
> not included in Tomcat.DEFAULT_MIME_MAPPINGS. Fixing it isn't too
> hard. The 844 figure comes from a unit test I could easily tweak to
> generate the code needed to paste in to add these.
> 
> The question is, do we want to keep these in sync?
> 
> If the answer is yes I can get this fixed fairly quickly and add
> some unit tests to ensure that they stay in sync.
> 
> Thoughts?

What about reading them from a file instead of hard-coding them?

That same file can be used at build-time to generate the actual
contents of the conf/web.xml that we ship as a binary.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl3n9tsACgkQHPApP6U8
pFg6nQ/8CwL8kb5V0t/3or5VmbzM0gkpPsHvRYawXSsgUXxgjk+6fErKH43oEBrX
MDSUJzysMn/LooYBrwhv4dgi1CyiI/75vRHQ0bzYNlOaqRT3Ne+H7Y3SyWWBl6zH
Xmrdoj1dzxqbRJeAv5emn+BvFLcxCdt6aFMLT5lJBUkTwtHn5dQK4D26CDmgaSM/
NABwV0UHt2UOhslI7vk/7+CB/t5V7iuAFbAId8qq6Ydk67uO/Lv01HMUJdyd3bd1
WKQaM99yx8ENMjTQzOEQ8KqItQ9pIn08JAqIE23Yc8noxCW7LYIGKfh/254vFR+K
x+K+DMnn9TDx97ucH7mujVyOcRE/gkHm9vJNqULRSah8k9W/W9STC5xxp2ecplvP
ynVabwLEWD3mPuUrN43uWGJD93JTXmuGFIgusbeWEbYCUIB132+Vy5lYOH+2Dsqj
X5Wt9tXfdEX3dTYhwk0VaoU8LeN2TpwTR2kIgyHWmQDYLAMG6ubkOfxoRB5jQ8BN
uUWhxSbBh1PLDzd5hicmEN5xWJTBmeGY8phDFdrP5GPef8fvPMYHhsWThvoZvxrT
Q3Rs9Ii1NNt63i7JjWcsTXlPtR+NqtIUvUeF+EGl8QHEbOlcjIGwaP3gKYYfUXpE
JA467ZyhUgLIP3jH00tNvveEJDpo0Ta558YAph/+XpeKMBzFR0Y=
=gfpu
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org