httptypes: test HTTPError
httptypes: set headers before call to WriteHeader
Merge pull request #1464 from bcwaldon/error-ctype

Set Content-Type before calling WriteHeader