Commit ae365421 authored by Jacob Vosmaer's avatar Jacob Vosmaer

Try harder to make it a copy

parent 0044b862
...@@ -53,13 +53,13 @@ func headerClone(h http.Header) http.Header { ...@@ -53,13 +53,13 @@ func headerClone(h http.Header) http.Header {
func (u *upstream) proxyRequest(w http.ResponseWriter, r *http.Request) { func (u *upstream) proxyRequest(w http.ResponseWriter, r *http.Request) {
// Clone request // Clone request
req := r req := *r
req.Header = headerClone(r.Header) req.Header = headerClone(r.Header)
// Set Workhorse version // Set Workhorse version
req.Header.Set("Gitlab-Workhorse", Version) req.Header.Set("Gitlab-Workhorse", Version)
rw := newSendFileResponseWriter(w, req) rw := newSendFileResponseWriter(w, &req)
defer rw.Flush() defer rw.Flush()
u.httpProxy.ServeHTTP(&rw, req) u.httpProxy.ServeHTTP(&rw, &req)
} }
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