Commit 2788c575 authored by Jacob Vosmaer's avatar Jacob Vosmaer

Skip empty send-data header quicker

parent ec168f4b
......@@ -68,7 +68,7 @@ func (s *sendFileResponseWriter) WriteHeader(status int) {
return
}
header := s.Header().Get(senddata.Header)
if header := s.Header().Get(senddata.Header); header != "" {
s.Header().Del(senddata.Header)
for _, handler := range []senddata.Handler{
git.SendBlob,
......@@ -80,6 +80,7 @@ func (s *sendFileResponseWriter) WriteHeader(status int) {
return
}
}
}
s.rw.WriteHeader(s.status)
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