Bug with headers() + flush()

Discussion about the open-source Phalanger [?] project.

Bug with headers() + flush()

Postby kripper » September 14th, 2017, 8:41 pm

flush() is resetting the HTTP headers()

Sample code:

Code: Select all
header('Content-Transfer-Encoding: binary');
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment; filename=test.xls');
header('Pragma: no-cache');
header('Expires: 0');

echo "Content\n";



Expected result: headers should be sent.

Actual result: no headers are sent when calling flush().
Posts: 43
Joined: February 19th, 2012, 1:02 am

Return to Phalanger project

Who is online

Users browsing this forum: Bing [Bot] and 1 guest


User Control Panel


Who is online

In total there are 2 users online :: 1 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 62 on January 7th, 2012, 10:54 pm

Users browsing this forum: Bing [Bot] and 1 guest