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
d79f8563
Commit
d79f8563
authored
Jan 11, 2016
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not duplicate http.DefaultTransport
parent
92b51f76
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
7 deletions
+2
-7
internal/badgateway/roundtripper.go
internal/badgateway/roundtripper.go
+2
-7
No files found.
internal/badgateway/roundtripper.go
View file @
d79f8563
...
...
@@ -17,12 +17,6 @@ var DefaultDialer = &net.Dialer{
KeepAlive
:
30
*
time
.
Second
,
}
var
DefaultTransport
=
&
http
.
Transport
{
Proxy
:
http
.
ProxyFromEnvironment
,
// from http.DefaultTransport
Dial
:
DefaultDialer
.
Dial
,
// from http.DefaultTransport
TLSHandshakeTimeout
:
10
*
time
.
Second
,
// from http.DefaultTransport
}
type
RoundTripper
struct
{
Socket
string
ProxyHeadersTimeout
time
.
Duration
...
...
@@ -67,7 +61,8 @@ func (t *RoundTripper) configureRoundTripper() {
return
}
tr
:=
*
DefaultTransport
// Clone http.DefaultTransport. Needs a cast from http.RoundTripper to *http.Transport.
tr
:=
*
(
http
.
DefaultTransport
.
(
*
http
.
Transport
))
tr
.
ResponseHeaderTimeout
=
t
.
ProxyHeadersTimeout
if
t
.
Socket
!=
""
{
...
...
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