Fix the content-type of the error responses.

At that point the headers have already been written by WriteHeaders.
Need to set them before.