Skip to content

Commit d389ed2

Browse files
tsl0922lunny
authored andcommitted
Fix: http: multiple response.WriteHeader calls (#2038)
We can't change the http status code here, because the response has been written.
1 parent 32fc44a commit d389ed2

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

routers/repo/http.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,6 @@ func serviceRPC(h serviceHandler, service string) {
381381
cmd.Stderr = &stderr
382382
if err := cmd.Run(); err != nil {
383383
log.GitLogger.Error(2, "fail to serve RPC(%s): %v - %v", service, err, stderr)
384-
h.w.WriteHeader(http.StatusInternalServerError)
385384
return
386385
}
387386
}

0 commit comments

Comments
 (0)