Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-workhorse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-workhorse
Commits
73e82887
Commit
73e82887
authored
Aug 19, 2016
by
Jacob Vosmaer (GitLab)
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'metrics-typo' into 'master'
Fix typo in header name See merge request !59
parents
579c16cd
f333be5c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
internal/proxy/proxy.go
internal/proxy/proxy.go
+1
-1
proxy_test.go
proxy_test.go
+2
-2
No files found.
internal/proxy/proxy.go
View file @
73e82887
...
...
@@ -32,7 +32,7 @@ func (p *Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request) {
// Set Workhorse 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-Wor
k
horse-Proxy-Start"
,
fmt
.
Sprintf
(
"%d"
,
time
.
Now
()
.
UnixNano
()))
p
.
reverseProxy
.
ServeHTTP
(
w
,
&
req
)
}
proxy_test.go
View file @
73e82887
...
...
@@ -42,8 +42,8 @@ func TestProxyRequest(t *testing.T) {
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"
)
{
t
.
Fatalf
(
"Expect Gitlab-Worhorse-Proxy-Start to start with 1, got %q"
,
h
)
if
h
:=
r
.
Header
.
Get
(
"Gitlab-Wor
k
horse-Proxy-Start"
);
!
strings
.
HasPrefix
(
h
,
"1"
)
{
t
.
Fatalf
(
"Expect Gitlab-Wor
k
horse-Proxy-Start to start with 1, got %q"
,
h
)
}
var
body
bytes
.
Buffer
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment