JuliaWeb / HTTP.jl

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

Suggestions for avoiding issues similar to #1172 and #1104 #1176

Open cmcaine opened 1 month ago

cmcaine commented 1 month ago

Sorry for the hassle of introducing a bug (#1172) with #1106 (my PR to fix #1104). In the interests of avoiding similar errors in HTTP.jl or HTTP2.jl, here's a reflection on what happened.

Conclusion first: my suggestions for future versions of this package or HTTP2.jl

I made the original PR (#1106) ages ago so I can't remember what I was thinking at the time, but I probably thought connectionlayer() was too confusing to try to understand or I half arsed it by getting my tests to pass and trusted to my competence or review to catch any errors.

These changes to the API would probably have prevented #1104:

And these things might have reduced the chance of #1104 occurring in the first place:

Any of these might have detected #1172 before the merge:

And these things might have meant the original regression from the change in meaning of sslconfig (#1106) was caught: