diff --git a/CHANGELOG.md b/CHANGELOG.md index 016b32a..da2b6b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +## [1.3.3] - 2024-03-19 + +- Fix bug where overriding http.DefaultTransport with an implementation other than http.Transport would result in an interface conversion panic + +### Changed + ## [1.3.2] - 2024-02-28 ### Changed diff --git a/pipeline.go b/pipeline.go index 0135ac1..3112abf 100644 --- a/pipeline.go +++ b/pipeline.go @@ -60,7 +60,11 @@ func (transport *customTransport) RoundTrip(req *nethttp.Request) (*nethttp.Resp // GetDefaultTransport returns the default http transport used by the library func GetDefaultTransport() nethttp.RoundTripper { - defaultTransport := nethttp.DefaultTransport.(*nethttp.Transport).Clone() + defaultTransport, ok := nethttp.DefaultTransport.(*nethttp.Transport) + if !ok { + return nethttp.DefaultTransport + } + defaultTransport = defaultTransport.Clone() defaultTransport.ForceAttemptHTTP2 = true defaultTransport.DisableCompression = false return defaultTransport diff --git a/user_agent_handler.go b/user_agent_handler.go index 552aca6..c984b8e 100644 --- a/user_agent_handler.go +++ b/user_agent_handler.go @@ -42,7 +42,7 @@ func NewUserAgentHandlerOptions() *UserAgentHandlerOptions { return &UserAgentHandlerOptions{ Enabled: true, ProductName: "kiota-go", - ProductVersion: "1.3.1", + ProductVersion: "1.3.3", } }