Commit e6b5a4f
fix(httpclient): clone DefaultTransport + only set RootCAs with custom CA (OD-30)
Address PR #205 review:
- Clone http.DefaultTransport to preserve connection pooling, idle/handshake
timeouts, and HTTP/2 instead of building a bare Transport.
- Only set tls.Config.RootCAs when SSL_CERT_FILE is configured; leave nil
otherwise so Go uses default system verification. Prevents an empty pool
(when SystemCertPool fails) from rejecting all TLS handshakes.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent a66ee27 commit e6b5a4f
2 files changed
Lines changed: 14 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
30 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
| 41 | + | |
38 | 42 | | |
39 | 43 | | |
40 | | - | |
41 | 44 | | |
42 | 45 | | |
43 | 46 | | |
| |||
0 commit comments