Commit 0e2a554c authored by Juan Batiz-Benet's avatar Juan Batiz-Benet

cmds: fix error header output

using Header().Set after WriteHeader() has no effect.
cc @mappum
parent 92e8a7bc
...@@ -95,8 +95,8 @@ func (i Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { ...@@ -95,8 +95,8 @@ func (i Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
out, err := res.Reader() out, err := res.Reader()
if err != nil { if err != nil {
w.WriteHeader(http.StatusInternalServerError)
w.Header().Set(contentTypeHeader, "text/plain") w.Header().Set(contentTypeHeader, "text/plain")
w.WriteHeader(http.StatusInternalServerError)
w.Write([]byte(err.Error())) w.Write([]byte(err.Error()))
return return
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment