Commit f333be5c authored by Jacob Vosmaer's avatar Jacob Vosmaer

Fix typo in header name

parent 579c16cd
...@@ -32,7 +32,7 @@ func (p *Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request) { ...@@ -32,7 +32,7 @@ func (p *Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request) {
// Set Workhorse version // Set Workhorse version
req.Header.Set("Gitlab-Workhorse", p.Version) req.Header.Set("Gitlab-Workhorse", p.Version)
req.Header.Set("Gitlab-Worhorse-Proxy-Start", fmt.Sprintf("%d", time.Now().UnixNano())) req.Header.Set("Gitlab-Workhorse-Proxy-Start", fmt.Sprintf("%d", time.Now().UnixNano()))
p.reverseProxy.ServeHTTP(w, &req) p.reverseProxy.ServeHTTP(w, &req)
} }
...@@ -42,8 +42,8 @@ func TestProxyRequest(t *testing.T) { ...@@ -42,8 +42,8 @@ func TestProxyRequest(t *testing.T) {
t.Fatalf("Missing GitLab-Workhorse header: want %q, got %q", testVersion, h) t.Fatalf("Missing GitLab-Workhorse header: want %q, got %q", testVersion, h)
} }
if h := r.Header.Get("Gitlab-Worhorse-Proxy-Start"); !strings.HasPrefix(h, "1") { if h := r.Header.Get("Gitlab-Workhorse-Proxy-Start"); !strings.HasPrefix(h, "1") {
t.Fatalf("Expect Gitlab-Worhorse-Proxy-Start to start with 1, got %q", h) t.Fatalf("Expect Gitlab-Workhorse-Proxy-Start to start with 1, got %q", h)
} }
var body bytes.Buffer var body bytes.Buffer
......
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