Menu Content

Support

> Forums, FAQs & Paid Support
Support forum for users using free edition of JoomDOC. These forums are mainly for mutual help between users.

NOTE: Due to our capacity limitations, ARTIO does not monitor this forum category regularly. If you want direct support from ARTIO, please start a ticket at Support Dashboard. If you have no support ticket available, you need to purchase it.
  • Page:
  • 1

TOPIC: Bad Content-Type

Bad Content-Type 15 years ago #23905

  • slavko
  • OFFLINE
  • Posts: 5
when trying to download some document, it can be downloaded, but the content-type is "text/html" and not by the real file type. by this, the browser is confised, when it gives the "open with" option.

I tried disable/enable SEF, without success.

Is here some configuration for it? I can fint nothing related...

Joomla 1.7.0 an JoomDoc 3.1.2
Last Edit: 15 years ago by slavko. Reason: forgot versions
The topic has been locked.

Re: Bad Content-Type 15 years ago #23948

  • slavko
  • OFFLINE
  • Posts: 5
OK. i will reply to my self :-) But for others, the problem is in administrator/components/com_joomdoc/libraries/joomdoc/filesystem/filesystem.php, where is condition (around line 462):
if (function_exists('mime_content_type')) {
header('Content-Type: ' . mime_content_type($fullPath) . '; charset=UTF-8');
}

If the 'mime_content_type' function doesn't exists, there is not Content-Type header added to document, simply adding one else with fallback to 'octet-stream' solves this (for me):
if (function_exists('mime_content_type')) {
header('Content-Type: ' . mime_content_type($fullPath) . '; charset=UTF-8');
} else {
header('Content-type: octet-stream');
}


There exist the fileinfo functions in PHP too, but at my hosting they do not works...

Thanks to artio for great component (realy) and for great support (joke)...
The topic has been locked.
  • Page:
  • 1
User Login Empty