Fix: http: multiple response.WriteHeader calls (#2038)

We can't change the http status code here, because the response has been written.
This commit is contained in:
Shuanglei Tao 2017-06-28 14:08:47 +08:00 committed by Lunny Xiao
parent 32fc44aa83
commit d389ed25a5

View file

@ -381,7 +381,6 @@ func serviceRPC(h serviceHandler, service string) {
cmd.Stderr = &stderr cmd.Stderr = &stderr
if err := cmd.Run(); err != nil { if err := cmd.Run(); err != nil {
log.GitLogger.Error(2, "fail to serve RPC(%s): %v - %v", service, err, stderr) log.GitLogger.Error(2, "fail to serve RPC(%s): %v - %v", service, err, stderr)
h.w.WriteHeader(http.StatusInternalServerError)
return return
} }
} }