Page 1 of 1

content-type not working after 1.7.4 upgrade

PostPosted: 12. April 2011 20:23
by Legster
The following is no longer working after upgrading from Xampp 1.7.1 to 1.7.4:
header("Content-Type: application/pdf");

After viewing the headers, the content-type is text/html. If i downgrade back to 1.7.1 it works fine. Anyone know a setting that could effect this? I had the same issue on our Solaris xampp upgrade.

Re: content-type not working after 1.7.4 upgrade

PostPosted: 12. April 2011 21:47
by WilliL
on my config it works fin3 on xamp 1.7.3 and 1.7.5beta (xampp standard settings) using firefox 3.6.16, IE6, Opera 11.01

Code: Select all
<?php
/* downloads test.pdf file as downloaded_test.pdf
header('Content-Transfer-Encoding: binary');
header('Content-type: application/pdf');
header('Content-Disposition: attachment; filename="downloaded_test.pdf"');
*/
/* shows test.pdf file in browser
header('Content-type: application/pdf');
*/

readfile('test.pdf');
?>

.. but I have no idea, what you want to ask .. :shock: