[support] Private file downloads not returning correct mime types

Cary Gordon listuser at chillco.com
Tue Apr 8 14:33:23 UTC 2008


When attempting to download files using the private file system, most  
files are displayed in the browser as text in Firefox and IE (Safari  
does not express this behavior). The HTTP content type header is "text/ 
plain".

Acrobat files (.pdf) seem to be unaffected by this behavior.

The correct content type is present in the database (files).

CentOS 5
Apache 2.2.3
PHP 2.1.6
MySQL 5.0.23

No errors. File system is private (writeable) and the files directory  
(home/sitefiles) is not in the site path (/var/www/html).

--------------------
HTTP Request Header

Connect to 208.77.191.123 on port 443 ... ok

GET /########/budget-guidelines.doc HTTP/1.1[CRLF]
Host: ########[CRLF]
Connection: close[CRLF]
User-Agent: Web-sniffer/1.0.27 (+http://web-sniffer.net/)[CRLF]
Accept-Encoding: gzip[CRLF]

Accept-Charset: ISO-8859-1,UTF-8;q=0.7,*;q=0.7[CRLF]
Cache-Control: no[CRLF]
Accept-Language: de,en;q=0.7,en-us;q=0.3[CRLF]
Referer: http://web-sniffer.net/[CRLF]
[CRLF]

--------------------
HTTP Response Header
Name 	Value 	Delim
HTTP Status Code: HTTP/1.1 200 OK

Date: 	Mon, 07 Apr 2008 21:12:54 GMT 	
Server: 	Apache/2.2.3 (CentOS) 	
X-Powered-By: 	PHP/5.1.6 	
Set-Cookie: 	 
SESS59899d92848801441e91bab683237584=gihepd9fh5r0blfa96ld9i6285;  
expires=Thu, 01 May 2008 00:46:14 GMT; path=/; domain=.######## 	
Expires: 	Sun, 19 Nov 1978 05:00:00 GMT 	
Last-Modified: 	Mon, 07 Apr 2008 21:12:54 GMT 	
Cache-Control: 	store, no-cache, must-revalidate 	
Cache-Control: 	post-check=0, pre-check=0 	
Content-Length: 	31232 	
Connection: 	close 	
Content-Type: 	text/plain; charset=UTF-8


Cary Gordon
The Cherry Hill Company
http://www.chillco.com

I'm riding my bicycle 545 miles from June 1-7, 2008 to end AIDS.
Find out how you can help at http://www.aidslifecycle.org/5312
Please come to our Big Bike Bake Bash party and fundraiser
April 13th - http://judyandcary.com






More information about the support mailing list