I upgraded my Tomcat-8.5.30 deployment to 8.5.37 and I am noticing problems
with the way css-files are served by Tomcat.
HTML pages look like:

<html lang="nl">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
content="width=device-width,initial-scale=1,shrink-to-fit=no">
<link rel="stylesheet" type="text/css" href="
https://hostname/context/myCSS.css";>
</head>
<body>unimportant</body>
</html>


When I check the network trace of the browser while downloading this page
it shows 'Content-Type:text/html;charset=UTF-8;' in the response header
both for the page itself but also for the resource "
https://hostname/context/myCSS.css";
although the mime-mapping for css-files is set to 'text/css' in the default
web.xml. This causes the page to be rendered incorrectly by the browser.

Is this a BUG in Tomcat-8.5.37? If so it doesn't yet seem to be listed on
the buglist of Tomcat8. If not how do I force the mime-type 'text/css' for
css files?

Reply via email to