You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2019/04/05 21:25:25 UTC
[couchdb-ibrowse] 19/20: Prefer IPv4 by default. Use the option
`{prefer_ipv6, true}` to force ibrowse to use ipv6 where available.
This is an automated email from the ASF dual-hosted git repository.
jaydoane pushed a commit to branch handle-dead-ibrowse_lb-pids
in repository https://gitbox.apache.org/repos/asf/couchdb-ibrowse.git
commit e6a0c366fc8fc982d7981087c1e9d1e28e2a235a
Author: Chandrashekhar Mullaparthi <ch...@gmail.com>
AuthorDate: Fri Sep 21 07:10:00 2018 +0100
Prefer IPv4 by default. Use the option `{prefer_ipv6, true}` to force ibrowse to use ipv6 where available.
---
CHANGELOG | 3 +++
README.md | 2 +-
src/ibrowse.app.src | 2 +-
src/ibrowse_http_client.erl | 18 ++++++++++++------
4 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/CHANGELOG b/CHANGELOG
index 7240b17..db72b27 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,9 @@
CONTRIBUTIONS & CHANGE HISTORY
==============================
+21-09-2018 - v4.4.2
+ * Fix for #163 - default to using IPv4
+
23-08-2018 - v4.4.1
* Fixes to TLS socket handling (PR#163)
* Fix ipv6 address family handling (PR#155)
diff --git a/README.md b/README.md
index d2d42e7..5080bf2 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,7 @@ ibrowse is a HTTP client written in erlang.
**Comments to:** chandrashekhar.mullaparthi@gmail.com
-**Current Version:** 4.4
+**Current Version:** 4.4.2
**Latest Version:** git://github.com/cmullaparthi/ibrowse.git
diff --git a/src/ibrowse.app.src b/src/ibrowse.app.src
index 7702e80..5882ff2 100644
--- a/src/ibrowse.app.src
+++ b/src/ibrowse.app.src
@@ -1,6 +1,6 @@
{application, ibrowse,
[{description, "Erlang HTTP client application"},
- {vsn, "4.4.1"},
+ {vsn, "4.4.2"},
{registered, [ibrowse_sup, ibrowse]},
{applications, [kernel,stdlib]},
{env, []},
diff --git a/src/ibrowse_http_client.erl b/src/ibrowse_http_client.erl
index 5faf074..e59228c 100644
--- a/src/ibrowse_http_client.erl
+++ b/src/ibrowse_http_client.erl
@@ -605,12 +605,18 @@ do_connect(Host, Port, Options, _State, Timeout) ->
get_sock_options(Host, Options, SSLOptions) ->
Caller_socket_options = get_value(socket_options, Options, []),
- Ipv6Options = case is_ipv6_host(Host) of
- true ->
- [inet6];
- false ->
- []
- end,
+ PreferIPv6 = get_value(prefer_ipv6, Options, false),
+ Ipv6Options = case PreferIPv6 of
+ true ->
+ case is_ipv6_host(Host) of
+ true ->
+ [inet6];
+ false ->
+ []
+ end;
+ false ->
+ []
+ end,
Other_sock_options = filter_sock_options(SSLOptions ++ Caller_socket_options ++ Ipv6Options),
case lists:keysearch(nodelay, 1, Other_sock_options) of
false ->