Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/mix/lib/mix/utils.ex
Original file line number Diff line number Diff line change
Expand Up @@ -765,6 +765,11 @@ defmodule Mix.Utils do
:httpc.set_options([ipfamily: fallback(inet)], :mix)
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.

http_options = put_in(http_options, [:ssl, :middlebox_comp_mode], false)
request |> httpc_request(http_options) |> httpc_response()

response ->
httpc_response(response)
end
Expand Down
Loading