On 16/04/2025 19:35, Thorsten Heit wrote:
Hi all,

long time Tomcat user, but first time I'm posting, so hi to you all :-)

I'm suffering a strange phenomenon after I upgraded Tomcat on one of our virtual machines from 10.1.39 to 10.1.40:

When I open the link to an application being served by Tomcat my browser (Firefox) now downloads a file instead of displaying the (generated) HTML page. With the network inspector I discovered that the content-type in the response is set to "content/unknown;charset=UTF-8". When reverting back to 10.1.39 everything works; the content-type in the response is (as expected) "text/html;charset=UTF-8".

In the changelog I haven't seen anything regarding this.

The configuration files used to start Tomcat are exactly the same in both scenarios, and the application isn't changed.

Can anyone explain what's happening?

That looks like the result of fixing this bug:
https://bz.apache.org/bugzilla/show_bug.cgi?id=69623

A little more digging suggests that MIME type is only set for a resource when it is served via the default servlet. I suspect that lookup needs to be moved so MIME type is also available when the default servlet is not used.

I should be able to put together a test case for what I think the problem is but I'd like to be sure it is fixing the problem you are seeing. There are a couple of options:

1. You test a SNAPSHOT build of Tomcat 10.1.x from the CI system that contains the fix once I have implemented what I think is the fix.

2. You provide the simplest possible web application that reproduces the issue and I use that to test.

Which approach works best for you?

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to