Jump to content

Apache2 and Content Type


Scott85

Recommended Posts

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.