Scott85 Posted September 18, 2008 Share Posted September 18, 2008 Hi. I'm having a problem that an Apache2 server is sending a content type of text/plain for a PDF document instead of application/pdf. Here is the setup - there are a number of Ruby on Rails applications running mongrel processes behind the Apache2 server. The PDF documents are in the Public folders of the RoR apps. When I try to access the PDFs from IE7 or Safari, they work fine. When I try to access from Firefox 2 or 3, they show up as plain text. Checking with curl -I confirms that the server is sending "text/plain" as the content type. There is already an "application/pdf pdf" entry in the conf/mime.types, and adding "AddType application/pdf .pdf" to conf/httpd.conf doesn't help. Also, there is an approval server running the same RoR apps in the same setup, and it serves the PDFs correctly (with an "application/pdf" content type). So, what do I need to change to make the server send application/pdf content type for PDFs? My experience with Apache is limited, and I didn't set these servers up, but if you need any more information I should be able to find out. Thanks for any help. Quote Link to comment https://forums.phpfreaks.com/topic/124853-apache2-and-content-type/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.