Procházet zdrojové kódy

Prefer IPv4 by default. Use the option `{prefer_ipv6, true}` to force ibrowse to use ipv6 where available.

pull/168/head
Chandrashekhar Mullaparthi před 6 roky
rodič
revize
e6a0c366fc
4 změnil soubory, kde provedl 17 přidání a 8 odebrání
  1. +3
    -0
      CHANGELOG
  2. +1
    -1
      README.md
  3. +1
    -1
      src/ibrowse.app.src
  4. +12
    -6
      src/ibrowse_http_client.erl

+ 3
- 0
CHANGELOG Zobrazit soubor

@ -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)

+ 1
- 1
README.md Zobrazit soubor

@ -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

+ 1
- 1
src/ibrowse.app.src Zobrazit soubor

@ -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, []},

+ 12
- 6
src/ibrowse_http_client.erl Zobrazit soubor

@ -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 ->

Načítá se…
Zrušit
Uložit