MIME Type Problem

Hi,

I have a web server set up on my Mac, and I'm using it to develop some web software in PHP. One of the requirements it has is the ability to detect the MIME type of files on the system.

When it attempts to detect the MIME Type of '.js' files, it's coming up with 'text/x-c++', as opposed to 'text/javascript' or similar.

I thought this might be an apache problem, but running 'file -bI' on the command line brings the same result.

Any one know how I can correct this? I think that Xcode may have caused the initial problem, but that's an outright guess.

Macbook Pro, Mac OS X (10.5.8)

Posted on Aug 27, 2009 3:34 AM

Reply
4 replies

Aug 27, 2009 3:48 AM in response to Federico_82

No good.

See below:

mygateway1:edit-select pete$ more /private/etc/apache2/mime.types | grep 'text/plain'
text/plain txt text conf def list log in
mygateway1:edit-select pete$ more /private/etc/apache2/mime.types | grep 'text/x-c++'
mygateway1:edit-select pete$ more /private/etc/apache2/mime.types | grep 'js'
application/javascript js
application/json json
application/vnd.cab-jscript

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

MIME Type Problem

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.