|
5 | 5 | "context"
|
6 | 6 | "fmt"
|
7 | 7 | "io"
|
8 |
| - "net" |
9 | 8 | "net/http"
|
10 | 9 | "net/url"
|
11 | 10 | "strconv"
|
@@ -94,43 +93,10 @@ func New(path Route, conf *config.Config, log logger.Logger, stats stats.Stats)
|
94 | 93 | reportingServiceURL := conf.GetString("REPORTING_URL", "https://reporting.dev.rudderlabs.com")
|
95 | 94 | reportingServiceURL = strings.TrimSuffix(reportingServiceURL, "/")
|
96 | 95 |
|
97 |
| - transport := http.DefaultTransport.(*http.Transport).Clone() |
98 |
| - |
99 |
| - if conf.IsSet("Reporting.httpClient.transport.maxIdleConns") { |
100 |
| - transport.MaxIdleConns = conf.GetInt("Reporting.httpClient.transport.maxIdleConns", 100) |
101 |
| - } |
102 |
| - |
103 |
| - if conf.IsSet("Reporting.httpClient.transport.idleConnTimeout") { |
104 |
| - transport.IdleConnTimeout = conf.GetDurationVar(90, time.Second, "Reporting.httpClient.transport.idleConnTimeout") |
105 |
| - } |
106 |
| - |
107 |
| - if conf.IsSet("Reporting.httpClient.transport.tlsHandshakeTimeout") { |
108 |
| - transport.TLSHandshakeTimeout = conf.GetDurationVar(10, time.Second, "Reporting.httpClient.transport.tlsHandshakeTimeout") |
109 |
| - } |
110 |
| - |
111 |
| - if conf.IsSet("Reporting.httpClient.transport.disableKeepAlives") { |
112 |
| - transport.DisableKeepAlives = conf.GetBool("Reporting.httpClient.transport.disableKeepAlives", false) |
113 |
| - } |
114 |
| - |
115 |
| - if conf.IsSet("Reporting.httpClient.transport.dialer.timeout") { |
116 |
| - transport.DialContext = (&net.Dialer{ |
117 |
| - Timeout: conf.GetDurationVar(30, time.Second, "Reporting.httpClient.transport.dialer.timeout"), |
118 |
| - KeepAlive: conf.GetDurationVar(30, time.Second, "Reporting.httpClient.transport.dialer.keepAlive"), |
119 |
| - }).DialContext |
120 |
| - } |
121 |
| - |
122 |
| - if conf.IsSet("Reporting.httpClient.transport.forceAttemptHTTP2") { |
123 |
| - transport.ForceAttemptHTTP2 = conf.GetBool("Reporting.httpClient.transport.forceAttemptHTTP2", true) |
124 |
| - } |
125 |
| - |
126 |
| - if conf.IsSet("Reporting.httpClient.transport.expectContinueTimeout") { |
127 |
| - transport.ExpectContinueTimeout = conf.GetDurationVar(1, time.Second, "Reporting.httpClient.transport.expectContinueTimeout") |
128 |
| - } |
129 |
| - |
130 | 96 | return &Client{
|
131 | 97 | httpClient: &http.Client{
|
132 | 98 | Timeout: conf.GetDurationVar(60, time.Second, "Reporting.httpClient.timeout", "HttpClient.reporting.timeout"),
|
133 |
| - Transport: transport, |
| 99 | + Transport: &http.Transport{}, |
134 | 100 | },
|
135 | 101 | reportingServiceURL: reportingServiceURL,
|
136 | 102 | backoff: backOffFromConfig(conf),
|
|
0 commit comments