Don't write empty string to buffer

... otherwise you can't set the headers afterwards.