From 2513dad83aadd6fd9a58dfe4845d21de2a692d12 Mon Sep 17 00:00:00 2001 From: Mikael Pettersson Date: Tue, 27 Feb 2024 17:38:03 +0100 Subject: [PATCH] pass verify_none to httpc:request --- src/erlsom_lib.erl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/erlsom_lib.erl b/src/erlsom_lib.erl index 172a183..b4260ac 100644 --- a/src/erlsom_lib.erl +++ b/src/erlsom_lib.erl @@ -856,7 +856,8 @@ getFile(Location, IncludeDirs) -> end. httpGetFile(URL) -> - case httpc:request(get, {URL, [{"user-agent", "erlsom"}]}, [], []) of + HttpOptions = [{ssl, [{verify, verify_none}]}], + case httpc:request(get, {URL, [{"user-agent", "erlsom"}]}, HttpOptions, []) of {ok,{{_HTTP,200,_OK}, _Headers, Body}} -> toUnicode(Body); {ok,{{_HTTP,RC,Emsg}, _Headers, _Body}} -> @@ -924,7 +925,8 @@ prefix(Namespace) -> %%% slightly modified %%% -------------------------------------------------------------------- get_url("http://"++_ = URL) -> - case httpc:request(URL) of + HttpOptions = [{ssl, [{verify, verify_none}]}], + case httpc:request(get, {URL, []}, HttpOptions, []) of {ok, {{_HTTP, 200, _OK}, _Headers, Body}} -> {ok, Body}; _ ->