mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 03:27:54 +00:00
do not panic when Client.Transport is not *http.Transport (#3440)
This commit is contained in:
committed by
Jeff Mitchell
parent
6775fe4927
commit
022e93f627
@@ -271,9 +271,10 @@ func NewClient(c *Config) (*Client, error) {
|
||||
c.HttpClient.Transport = cleanhttp.DefaultTransport()
|
||||
}
|
||||
|
||||
tp := c.HttpClient.Transport.(*http.Transport)
|
||||
if err := http2.ConfigureTransport(tp); err != nil {
|
||||
return nil, err
|
||||
if tp, ok := c.HttpClient.Transport.(*http.Transport); ok {
|
||||
if err := http2.ConfigureTransport(tp); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
redirFunc := func() {
|
||||
|
||||
Reference in New Issue
Block a user