mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
fix(server/v2): set correct content-type for etcdError response
"net/http".Error reset the content type, so we get rid of it and write our own one.
This commit is contained in:
@@ -143,5 +143,6 @@ func (e Error) Write(w http.ResponseWriter) {
|
||||
status = http.StatusInternalServerError
|
||||
}
|
||||
}
|
||||
http.Error(w, e.toJsonString(), status)
|
||||
w.WriteHeader(status)
|
||||
fmt.Fprintln(w, e.toJsonString())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user