The dispatcher always return mime type with “text/html” | Community
Skip to main content
Level 3
October 16, 2015
Solved

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

  • October 16, 2015
  • 5 replies
  • 3820 views

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]

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Feike_Visser1

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

Search for ModMimeUsePathInfo

5 replies

Feike_Visser1
Adobe Employee
Adobe Employee
October 16, 2015

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
Adobe Employee
Feike_Visser1Adobe EmployeeAccepted solution
Adobe Employee
October 16, 2015

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

Search for ModMimeUsePathInfo

jiaBaiAuthor
Level 3
October 16, 2015

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?

OldOldOld
Level 2
October 16, 2015

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
Adobe Employee
Adobe Employee
October 16, 2015

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.