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