When I set a custom header in Apache + mod_php5, this works fine:
header(\'Foo: Bar\');
But when I try this while also sending a 3
I do a trick to solve this issue by : 1. put all header before 304 header 2. flush these header before send 304
header('Foo: Bar');
flush();
header('HTTP/1.1 304 No Content');
Apache will not remove any header until it found 304. We force other header send out by flush() before send 304. That apache can not hurt me.