Headers not being used

I have a php function that forces a Save as download to occur instead of throwing query results to html. I asked my question in the php forum but didn’t get much response. http://www.sitepoint.com/forums/showthread.php?t=676307 It works on my dev machine but not on the web server.

So I used the Firefox plugin Live HTTP headers to try and see what was going on. Here are the results from my local machine.

HTTP/1.1 200 OK
Date: Wed, 12 May 2010 22:15:00 GMT
Server: Apache/2.2.14 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Content-Disposition: attachment; filename=data.csv
Keep-Alive: timeout=5, max=97
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/csv

And this is the results from running it on the web server…

HTTP/1.0 200 OK
Date: Wed, 12 May 2010 22:12:43 GMT
Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.7a mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
X-Powered-By: PHP/5.2.12
Content-Type: text/html
X-Cache: MISS from KRYTEN.logistics.int
X-Cache-Lookup: MISS from KRYTEN.logistics.int:8080
Via: 1.0 KRYTEN.logistics.int:8080 (squid/2.6.STABLE5)
Proxy-Connection: close

It seems something on the webserver is overriding my headers… any ideas how to remedy this?