client: use constants for http status codes

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2019-10-13 17:25:39 +02:00
parent dabc7cdb56
commit d1817b6135
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -25,13 +25,13 @@ func TestTLSCloseWriter(t *testing.T) {
defer close(chErr)
if err := httputils.ParseForm(req); err != nil {
chErr <- errors.Wrap(err, "error parsing form")
http.Error(w, err.Error(), 500)
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
r, rw, err := httputils.HijackConnection(w)
if err != nil {
chErr <- errors.Wrap(err, "error hijacking connection")
http.Error(w, err.Error(), 500)
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
defer r.Close()