Commit 0044b862 authored by Jacob Vosmaer's avatar Jacob Vosmaer

Revert "Remove unnecessary duplicate variable"

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