I posted a similar question recently. I ended up using an
method by Fastolfe that I found somewhere. That is a standard module that everyone has installed, so it should be a good solution. The disadvantage is, you have to remove the header yourself, and also you have to worry more about error handling. However, it worked readily for me.