Commit b533f562 authored by Jacob Vosmaer's avatar Jacob Vosmaer

Document that we intercept WriteHeader already

parent 0af84341
......@@ -40,7 +40,8 @@ func postRPCHandler(a *api.API, name string, handler func(*GitHttpResponseWriter
if err := handler(w, r, ar); err != nil {
// If the handler already wrote a response this WriteHeader call is a
// (harmless) no-op.
// no-op. It never reaches net/http because GitHttpResponseWriter calls
// WriteHeader on its underlying ResponseWriter at most once.
w.WriteHeader(500)
helper.LogError(r, fmt.Errorf("%s: %v", name, err))
}
......
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