You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SOAP requests to https urls fails with {:error, :enoent}
I traced it back to src/detergent.erl in deps, which doesn't have pattern matching for URLs starting with https. It falls back to reading from a local file with the name of the URL, which doesn't exist. The code I'm seeing is
get_url_file("http://"++_ = URL) ->
case httpc:request(URL) of
{ok,{{_HTTP,200,_OK}, _Headers, Body}} ->
{ok, Body};
{ok,{{_HTTP,RC,Emsg}, _Headers, _Body}} ->
error_logger:error_msg("~p: http-request got: ~p~n", [?MODULE, {RC, Emsg}]),
{error, "failed to retrieve: "++URL};
{error, Reason} ->
error_logger:error_msg("~p: http-request failed: ~p~n", [?MODULE, Reason]),
{error, "failed to retrieve: "++URL}
end;
get_url_file("file://"++Fname) ->
{ok, Bin} = file:read_file(Fname),
{ok, binary_to_list(Bin)};
%% added this, since this is what is used in many WSDLs (i.e.: just a filename).
get_url_file(Fname) ->
{ok, Bin} = file:read_file(Fname),
{ok, binary_to_list(Bin)}.
SOAP requests to https urls fails with
{:error, :enoent}
I traced it back to
src/detergent.erl
in deps, which doesn't have pattern matching for URLs starting withhttps
. It falls back to reading from a local file with the name of the URL, which doesn't exist. The code I'm seeing isHowever detergent at https://github.com/devinus/detergent/blob/master/src/detergent.erl has the same version of the dependency in detergentex (0.3.0) and does support https (https://github.com/devinus/detergent/blob/master/src/detergent.erl#L395).
That was added in 2013 with devinus/detergent@5354f1c#diff-c46a9580e05c152c0b037750f88eb760
It happens that detergentex is downloading an older detergent or some different fork. However https://hex.pm/packages/detergent links to https://github.com/devinus/detergent
I wonder if there is some dependency mismatch and if
mix.exs
could be updated to depend from the version at https://github.com/devinus/detergentThanks
The text was updated successfully, but these errors were encountered: