Page 1 of 1

Bug with headers() + flush()

PostPosted: September 14th, 2017, 8:41 pm
by kripper
flush() is resetting the HTTP headers()

Sample code:

Code: Select all
<?php
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";

flush();

die('ok');


Expected result: headers should be sent.

Actual result: no headers are sent when calling flush().

Re: Bug with headers() + flush()

PostPosted: October 27th, 2017, 8:50 pm
by kripper
Please confirm this is a bug in Phalanger.