Permalink
Browse files

don't put insecure option as a default.

add an insecure option using the same curl naming and let certificate
validation by default.
  • Loading branch information...
1 parent 7cebd8b commit f368fea26425eb0cd3d28904f983252463bc6a4f @benoitc committed Oct 26, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/hackney.erl
View
@@ -318,8 +318,13 @@ do_connect(Transport, Host, Port, #client{options=Opts}=Client) ->
ConnectOpts = case {Transport, proplists:get_value(ssl_options, Opts)} of
{hackney_ssl_transport, undefined} ->
- ConnectOpts1 ++ [{verify, verify_none},
+ case proplists:get_value(insecure, Opts) of
+ true ->
+ ConnectOpts1 ++ [{verify, verify_none},
{reuse_sessions, true}];
+ _ ->
+ ConnectOpts1
+ end;
{hackney_ssl_transport, SslOpts} ->
ConnectOpts1 ++ SslOpts;
{_, _} ->

0 comments on commit f368fea

Please sign in to comment.