flush output after end_headers