Send headers in http errors, fixes #81