JuliaWeb / HTTP.jl

HTTP for Julia
https://juliaweb.github.io/HTTP.jl/stable/
Other
626 stars 177 forks source link

Unintentional(?) breaking change to type of `sslconfig` #1104

Closed cmcaine closed 3 months ago

cmcaine commented 10 months ago

https://github.com/JuliaWeb/HTTP.jl/blob/b64beb797470ef6c96e75ef7c77d60f975fd32f1/src/HTTP.jl#L27

This is a breaking change because it changes the accepted type for the sslconfig keyword argument that many functions in the public API of HTTP.jl accept.

Did you intend to change this? It seems unrelated to your other changes in https://github.com/JuliaWeb/HTTP.jl/commit/b64beb797470ef6c96e75ef7c77d60f975fd32f1#r126540636

cmcaine commented 10 months ago

Because other users may now depend on sslconfig accepting an OpenSSL.SSLContext, we could choose the TLS library based on the type of the provided sslconfig (if provided), which seems like an improvement to me.

This is the only function that needs to be modified:

https://github.com/JuliaWeb/HTTP.jl/blob/8f35185c87c4bd7267c4923da423012e42b36103/src/clientlayers/ConnectionRequest.jl#L58

The change of default TLS socket type should still be reverted or documented, imo.