Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use an Apache server to make available J2ME application files (namely a *.jad file and a *.jar archive).

Now I know that to properly serve these files you need to tell Apache what their MIME type is. I also know that you can do this via .htaccess files, Directory directive in Apache configuration files or in /etc/mimes.types with the following commands:

  • [AddType] text/ jad
  • [AddType] application/java-archive jar

I used all these ways but I still can't download the jad file with a mobile phone, instead it is displayed as a text file.

Now my question is : is it possible to know which MIME type is used when a file is downloaded ?

Therefore I am looking for a diagnosis tool (preferably serverside) that can tell me in details what happens for each file served by Apache.

Thank you very much for your help.

share|improve this question
up vote 2 down vote accepted

is it possible to know which MIME type is used when a file is downloaded

This should be the value of the Content-Type HTTP Header.

It should be possible to modify your Apache LogFormat line to include the value of the Content-Type Header. %{Content-Type}o.

If you are not serving content over HTTPS, then you could install and use wireshark. This probably wouldn't be as useful if you want to collect this for many requests over time.

Many browsers and http clients will give you this information. Check out liveheaders on firefox. Both wget and curl include verbose modes that will display the content-type and other headers.

share|improve this answer
Great, I did not know so many details could be added to custom logs. Thanks a lot, it worked perfectly. – Aabaz Nov 8 '11 at 7:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.