Skip to content

Conversation

@ruslandoga
Copy link
Contributor

@ruslandoga ruslandoga commented Mar 24, 2025

closes #14356

Similar to inet<->inet6 fallback, this PR adds retries on tls_alert with middlebox_comp_mode: false

@ruslandoga ruslandoga marked this pull request as ready for review March 24, 2025 19:09
request |> httpc_request(http_options) |> httpc_response()

{:error, {:failed_connect, [{:to_address, _}, {inet, _, {:tls_alert, _}}]}}
when inet in [:inet, :inet6] ->
Copy link
Contributor Author

@ruslandoga ruslandoga Mar 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe less strict

{:error, {:failed_connect, [{:to_address, _}, {inet, _, reason}]}}
  when inet in [:inet, :inet6] and elem(reason, 0) == :tls_alert ->

or more strict

{:error, {:failed_connect, [{:to_address, _}, {inet, _, {:tls_alert, {:unexpected_message, _}}}]}}
  when inet in [:inet, :inet6] ->

matching?

Right now this error seems to always be {:tls_alert, _} but I couldn't find a record for it to future-proof it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think less strict is good as it is plausible to add more elements to the tuple.

@ruslandoga ruslandoga changed the title disable middlebox_comp_mode in mix httpc retry mix httpc with disabled middlebox_comp_mode Mar 24, 2025
@josevalim josevalim merged commit cf34fcc into elixir-lang:main Mar 24, 2025
10 checks passed
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

Wigny added a commit to Wigny/elixir that referenced this pull request Mar 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

mix local.hexfails with TLS 1.3. middlebox error

2 participants