Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

The dispatcher always return mime type with “text/html”

jiaBai
Level 4
Level 4

Hi Guys,

The dispatcher always return mime type with “text/html” and it makes the web page unreadable.

It due to some pictures, css, js…… cannot render correct. It is supposed to be text/css, text/png…….

Does anyone know this issue?

Thanks a lot.

[img]QQ截图20150316161230.png[/img]

1 Accepted Solution
Feike_Visser1
Correct answer by
Employee
Employee

See here for documentation: https://docs.adobe.com/docs/en/dispatcher/disp-install.html

Search for ModMimeUsePathInfo

View solution in original post

5 Replies
Feike_Visser1
Employee
Employee

Have you configured the ModMimeUsePathInfo? Like this here?

 

    <IfModule disp_apache2.c>

        ModMimeUsePathInfo On

        # enable dispatcher for ALL request. if this is too restrictive,

        # move it to another location

        SetHandler dispatcher-handler

    </IfModule>

Feike_Visser1
Correct answer by
Employee
Employee

See here for documentation: https://docs.adobe.com/docs/en/dispatcher/disp-install.html

Search for ModMimeUsePathInfo

View solution in original post

jiaBai
Level 4
Level 4

Thanks for your reply.

Your are right, it is working fine after I add this param. But I am weird that we have another server working fine without this param.

Such as this:

 <IfModule disp_apache2.c>

        # enable dispatcher for ALL request. if this is too restrictive,

        # move it to another location

        SetHandler dispatcher-handler

    </IfModule>

Could you know any possible to fix this without this parameter?

MeasurableBusinessResults
Level 2
Level 2

Dispatcher does not cache meta data (HTTP headers), it only caches the plain file.

So when Apache serves the file from the Dispatcher cache, it sets the MIME type according to the file name extensions. If you have this configured it will get applied.

Check your httpd.conf

Feike_Visser1
Employee
Employee

On my side I always had to add the mime-handler.

Only when requests are not cached, then it will get the correct content-type from the AEM-side.