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 { ...@@ -53,12 +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
r.Header = headerClone(r.Header) req := r
req.Header = headerClone(r.Header)
// Set Workhorse version // Set Workhorse version
r.Header.Set("Gitlab-Workhorse", Version) req.Header.Set("Gitlab-Workhorse", Version)
rw := newSendFileResponseWriter(w, r) rw := newSendFileResponseWriter(w, req)
defer rw.Flush() 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