I have a plugin that sends binary content inside a do_parse_request filter and I need to set the proper Content-Type header but when I do it I got an error saying that Headers was already sent.
How can I prevent wordpress from sending headers until my plugin have done it's work?