Skip to content

Commit

Permalink
bump to 0.16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
benoitc committed May 25, 2020
1 parent c95eb23 commit 8bb529e
Show file tree
Hide file tree
Showing 14 changed files with 248 additions and 34 deletions.
29 changes: 27 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,38 @@
# NEWS

1.16.0 - 2020-05-25
-------------------


- pool: cache connection IDs
- pool; make sure to reuse a connection if the options match the one given in the request. fix usage with proxy and ssl
connections
- url: handle fragment correctly, a fragment is parsed first to not be mistaken with an URL
- ssl: fix validation with Erlang 19 & Erlang 20
- ssl: handle tlsv1.3 on Erlang OTP 23
- ssl: increase validation depth to match openssl default
- ssl: optimiaz partial chain handling
- ssl: fix hostname checking and correctly handle SNI
- ssl: fix ciphers
- request: fix regression with fully fqdn
- ssl: fix usage with OTP 23
- url: decode username/password for basic auth parameters
- request: do not normalize when converting relative redirect to absolute
- ssl: update to certifi 2.5.2
- request: handle Connection: close response header for stteam
- http: handle leading new lines in HTTP messages
- http: handle trailers in persistent connection
- pool: update pool timeout docummentation
- url: fix urlencode

1.15.2 - 2019-09-25
-------------------

- doc: fix tes run example in readme
- fix: hackney stream, send `hackney_response` before calling `handle_error`
- fix: hackney stream, send `hackney_response` before calling `handle_error`
- fix: error remove ssl `honor_cipher_order` option
- doc: document self-signed certificate usage
- bump `ssl_verify_fun` to 1.1.5
- bump `ssl_verify_fun` to 1.1.5
- fix: don't use default pool if set to false
- fix: `hackney_headers_new:store/3` fix value appending to a list
- fix: miscellaeous specs
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Copyright (c) 2012-2020 Benoît Chesneau.

__Version:__ 1.15.2
__Version:__ 1.16.0

# hackney

Expand Down Expand Up @@ -365,8 +365,7 @@ Options = [{timeout, 150000}, {max_connections, 100}],
ok = hackney_pool:start_pool(PoolName, Options),
```

`timeout` is the connection idle timeout. Connection will be closed and removed from the pool after this.

`timeout` is the time we keep the connection alive in the pool,
`max_connections` is the number of connections maintained in the pool. Each
connection in a pool is monitored and closed connections are removed
automatically.
Expand Down Expand Up @@ -580,6 +579,8 @@ $ kill `cat httpbin.pid`
<tr><td><a href="http://github.com/benoitc/hackney/blob/master/doc/hackney_app.md" class="module">hackney_app</a></td></tr>
<tr><td><a href="http://github.com/benoitc/hackney/blob/master/doc/hackney_bstr.md" class="module">hackney_bstr</a></td></tr>
<tr><td><a href="http://github.com/benoitc/hackney/blob/master/doc/hackney_connect.md" class="module">hackney_connect</a></td></tr>
<tr><td><a href="http://github.com/benoitc/hackney/blob/master/doc/hackney_connection.md" class="module">hackney_connection</a></td></tr>
<tr><td><a href="http://github.com/benoitc/hackney/blob/master/doc/hackney_connections.md" class="module">hackney_connections</a></td></tr>
<tr><td><a href="http://github.com/benoitc/hackney/blob/master/doc/hackney_cookie.md" class="module">hackney_cookie</a></td></tr>
<tr><td><a href="http://github.com/benoitc/hackney/blob/master/doc/hackney_date.md" class="module">hackney_date</a></td></tr>
<tr><td><a href="http://github.com/benoitc/hackney/blob/master/doc/hackney_headers.md" class="module">hackney_headers</a></td></tr>
Expand Down
6 changes: 4 additions & 2 deletions doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

# hackney - HTTP client library in Erlang #

Copyright (c) 2012-2019 Benoît Chesneau.
Copyright (c) 2012-2020 Benoît Chesneau.

__Version:__ 1.15.2
__Version:__ 1.16.0

# hackney

Expand Down Expand Up @@ -579,6 +579,8 @@ $ kill `cat httpbin.pid`
<tr><td><a href="hackney_app.md" class="module">hackney_app</a></td></tr>
<tr><td><a href="hackney_bstr.md" class="module">hackney_bstr</a></td></tr>
<tr><td><a href="hackney_connect.md" class="module">hackney_connect</a></td></tr>
<tr><td><a href="hackney_connection.md" class="module">hackney_connection</a></td></tr>
<tr><td><a href="hackney_connections.md" class="module">hackney_connections</a></td></tr>
<tr><td><a href="hackney_cookie.md" class="module">hackney_cookie</a></td></tr>
<tr><td><a href="hackney_date.md" class="module">hackney_date</a></td></tr>
<tr><td><a href="hackney_headers.md" class="module">hackney_headers</a></td></tr>
Expand Down
14 changes: 7 additions & 7 deletions doc/edoc-info
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
%% encoding: UTF-8
{application,hackney}.
{modules,[hackney,hackney_app,hackney_bstr,hackney_connect,hackney_cookie,
hackney_date,hackney_headers,hackney_headers_new,hackney_http,
hackney_http_connect,hackney_local_tcp,hackney_manager,
hackney_metrics,hackney_multipart,hackney_pool,hackney_pool_handler,
hackney_request,hackney_response,hackney_socks5,hackney_ssl,
hackney_stream,hackney_sup,hackney_tcp,hackney_trace,hackney_url,
hackney_util]}.
{modules,[hackney,hackney_app,hackney_bstr,hackney_connect,hackney_connection,
hackney_connections,hackney_cookie,hackney_date,hackney_headers,
hackney_headers_new,hackney_http,hackney_http_connect,
hackney_local_tcp,hackney_manager,hackney_metrics,hackney_multipart,
hackney_pool,hackney_pool_handler,hackney_request,hackney_response,
hackney_socks5,hackney_ssl,hackney_stream,hackney_sup,hackney_tcp,
hackney_trace,hackney_url,hackney_util]}.
14 changes: 1 addition & 13 deletions doc/hackney_connect.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
## Function Index ##


<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#check_or_close-1">check_or_close/1</a></td><td></td></tr><tr><td valign="top"><a href="#close-1">close/1</a></td><td>close the client.</td></tr><tr><td valign="top"><a href="#connect-3">connect/3</a></td><td></td></tr><tr><td valign="top"><a href="#connect-4">connect/4</a></td><td></td></tr><tr><td valign="top"><a href="#connect-5">connect/5</a></td><td></td></tr><tr><td valign="top"><a href="#create_connection-4">create_connection/4</a></td><td>create a connection and return a client state.</td></tr><tr><td valign="top"><a href="#create_connection-5">create_connection/5</a></td><td></td></tr><tr><td valign="top"><a href="#is_pool-1">is_pool/1</a></td><td>get current pool pid or name used by a client if needed.</td></tr><tr><td valign="top"><a href="#maybe_connect-1">maybe_connect/1</a></td><td>connect a socket and create a client state.</td></tr><tr><td valign="top"><a href="#partial_chain-1">partial_chain/1</a></td><td></td></tr><tr><td valign="top"><a href="#peername-1">peername/1</a></td><td>get the address and port for the other end of current connection in the client.</td></tr><tr><td valign="top"><a href="#reconnect-4">reconnect/4</a></td><td></td></tr><tr><td valign="top"><a href="#set_sockopts-2">set_sockopts/2</a></td><td>add set sockets options in the client.</td></tr><tr><td valign="top"><a href="#sockname-1">sockname/1</a></td><td>the local address and port of current socket in the client.</td></tr><tr><td valign="top"><a href="#ssl_opts-2">ssl_opts/2</a></td><td></td></tr></table>
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#check_or_close-1">check_or_close/1</a></td><td></td></tr><tr><td valign="top"><a href="#close-1">close/1</a></td><td>close the client.</td></tr><tr><td valign="top"><a href="#connect-3">connect/3</a></td><td></td></tr><tr><td valign="top"><a href="#connect-4">connect/4</a></td><td></td></tr><tr><td valign="top"><a href="#connect-5">connect/5</a></td><td></td></tr><tr><td valign="top"><a href="#create_connection-4">create_connection/4</a></td><td>create a connection and return a client state.</td></tr><tr><td valign="top"><a href="#create_connection-5">create_connection/5</a></td><td></td></tr><tr><td valign="top"><a href="#is_pool-1">is_pool/1</a></td><td>get current pool pid or name used by a client if needed.</td></tr><tr><td valign="top"><a href="#maybe_connect-1">maybe_connect/1</a></td><td>connect a socket and create a client state.</td></tr><tr><td valign="top"><a href="#peername-1">peername/1</a></td><td>get the address and port for the other end of current connection in the client.</td></tr><tr><td valign="top"><a href="#reconnect-4">reconnect/4</a></td><td></td></tr><tr><td valign="top"><a href="#set_sockopts-2">set_sockopts/2</a></td><td>add set sockets options in the client.</td></tr><tr><td valign="top"><a href="#sockname-1">sockname/1</a></td><td>the local address and port of current socket in the client.</td></tr></table>


<a name="functions"></a>
Expand Down Expand Up @@ -78,12 +78,6 @@ get current pool pid or name used by a client if needed

connect a socket and create a client state.

<a name="partial_chain-1"></a>

### partial_chain/1 ###

`partial_chain(Certs) -> any()`

<a name="peername-1"></a>

### peername/1 ###
Expand Down Expand Up @@ -114,9 +108,3 @@ add set sockets options in the client

the local address and port of current socket in the client

<a name="ssl_opts-2"></a>

### ssl_opts/2 ###

`ssl_opts(Host, Options) -> any()`

78 changes: 78 additions & 0 deletions doc/hackney_connection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@


# Module hackney_connection #
* [Function Index](#index)
* [Function Details](#functions)

<a name="index"></a>

## Function Index ##


<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#close-2">close/2</a></td><td></td></tr><tr><td valign="top"><a href="#connect-3">connect/3</a></td><td></td></tr><tr><td valign="top"><a href="#connect_options-3">connect_options/3</a></td><td></td></tr><tr><td valign="top"><a href="#controlling_process-3">controlling_process/3</a></td><td></td></tr><tr><td valign="top"><a href="#get_property-2">get_property/2</a></td><td></td></tr><tr><td valign="top"><a href="#is_ssl-1">is_ssl/1</a></td><td></td></tr><tr><td valign="top"><a href="#new-1">new/1</a></td><td></td></tr><tr><td valign="top"><a href="#setopts-3">setopts/3</a></td><td></td></tr><tr><td valign="top"><a href="#ssl_opts-2">ssl_opts/2</a></td><td></td></tr><tr><td valign="top"><a href="#sync_socket-2">sync_socket/2</a></td><td></td></tr></table>


<a name="functions"></a>

## Function Details ##

<a name="close-2"></a>

### close/2 ###

`close(Connection, Socket) -> any()`

<a name="connect-3"></a>

### connect/3 ###

`connect(Connection, ConnectOptions, Timeout) -> any()`

<a name="connect_options-3"></a>

### connect_options/3 ###

`connect_options(Transport, Host, ClientOptions) -> any()`

<a name="controlling_process-3"></a>

### controlling_process/3 ###

`controlling_process(Connection, Socket, Owner) -> any()`

<a name="get_property-2"></a>

### get_property/2 ###

`get_property(X1, Connection) -> any()`

<a name="is_ssl-1"></a>

### is_ssl/1 ###

`is_ssl(Connection) -> any()`

<a name="new-1"></a>

### new/1 ###

`new(Client) -> any()`

<a name="setopts-3"></a>

### setopts/3 ###

`setopts(Connection, Socket, Opts) -> any()`

<a name="ssl_opts-2"></a>

### ssl_opts/2 ###

`ssl_opts(Host, Options) -> any()`

<a name="sync_socket-2"></a>

### sync_socket/2 ###

`sync_socket(Connection, Socket) -> any()`

86 changes: 86 additions & 0 deletions doc/hackney_connections.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@


# Module hackney_connections #
* [Function Index](#index)
* [Function Details](#functions)

__Behaviours:__ [`gen_server`](gen_server.md).

<a name="index"></a>

## Function Index ##


<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#code_change-3">code_change/3</a></td><td></td></tr><tr><td valign="top"><a href="#delete-1">delete/1</a></td><td></td></tr><tr><td valign="top"><a href="#get_num_entries-0">get_num_entries/0</a></td><td></td></tr><tr><td valign="top"><a href="#handle_call-3">handle_call/3</a></td><td></td></tr><tr><td valign="top"><a href="#handle_cast-2">handle_cast/2</a></td><td></td></tr><tr><td valign="top"><a href="#handle_info-2">handle_info/2</a></td><td></td></tr><tr><td valign="top"><a href="#init-1">init/1</a></td><td></td></tr><tr><td valign="top"><a href="#insert-2">insert/2</a></td><td></td></tr><tr><td valign="top"><a href="#lookup-1">lookup/1</a></td><td></td></tr><tr><td valign="top"><a href="#start_link-0">start_link/0</a></td><td></td></tr><tr><td valign="top"><a href="#terminate-2">terminate/2</a></td><td></td></tr></table>


<a name="functions"></a>

## Function Details ##

<a name="code_change-3"></a>

### code_change/3 ###

`code_change(OldVsn, State, Extra) -> any()`

<a name="delete-1"></a>

### delete/1 ###

`delete(Key) -> any()`

<a name="get_num_entries-0"></a>

### get_num_entries/0 ###

`get_num_entries() -> any()`

<a name="handle_call-3"></a>

### handle_call/3 ###

`handle_call(Msg, From, State) -> any()`

<a name="handle_cast-2"></a>

### handle_cast/2 ###

`handle_cast(Msg, State) -> any()`

<a name="handle_info-2"></a>

### handle_info/2 ###

`handle_info(Info, State) -> any()`

<a name="init-1"></a>

### init/1 ###

`init(X1) -> any()`

<a name="insert-2"></a>

### insert/2 ###

`insert(Key, Id) -> any()`

<a name="lookup-1"></a>

### lookup/1 ###

`lookup(Key) -> any()`

<a name="start_link-0"></a>

### start_link/0 ###

`start_link() -> any()`

<a name="terminate-2"></a>

### terminate/2 ###

`terminate(Reason, State) -> any()`

2 changes: 1 addition & 1 deletion doc/hackney_pool.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ release a socket in the pool

### checkout/4 ###

`checkout(Host0, Port, Transport, Client) -> any()`
`checkout(Host, Port, Transport, Client) -> any()`

fetch a socket from the pool

Expand Down
20 changes: 19 additions & 1 deletion doc/hackney_ssl.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,31 @@
## Function Index ##


<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#close-1">close/1</a></td><td>Close a TCP socket.</td></tr><tr><td valign="top"><a href="#connect-3">connect/3</a></td><td></td></tr><tr><td valign="top"><a href="#connect-4">connect/4</a></td><td></td></tr><tr><td valign="top"><a href="#controlling_process-2">controlling_process/2</a></td><td>Assign a new controlling process <em>Pid</em> to <em>Socket</em>.</td></tr><tr><td valign="top"><a href="#messages-1">messages/1</a></td><td>Atoms used to identify messages in {active, once | true} mode.</td></tr><tr><td valign="top"><a href="#peername-1">peername/1</a></td><td>Return the address and port for the other end of a connection.</td></tr><tr><td valign="top"><a href="#recv-2">recv/2</a></td><td></td></tr><tr><td valign="top"><a href="#recv-3">recv/3</a></td><td>Receive a packet from a socket in passive mode.</td></tr><tr><td valign="top"><a href="#send-2">send/2</a></td><td>Send a packet on a socket.</td></tr><tr><td valign="top"><a href="#setopts-2">setopts/2</a></td><td>Set one or more options for a socket.</td></tr><tr><td valign="top"><a href="#shutdown-2">shutdown/2</a></td><td>Immediately close a socket in one or two directions.</td></tr><tr><td valign="top"><a href="#sockname-1">sockname/1</a></td><td>Get the local address and port of a socket.</td></tr></table>
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#check_hostname_opts-1">check_hostname_opts/1</a></td><td></td></tr><tr><td valign="top"><a href="#cipher_opts-0">cipher_opts/0</a></td><td></td></tr><tr><td valign="top"><a href="#cipher_opts-0">cipher_opts/0</a></td><td></td></tr><tr><td valign="top"><a href="#close-1">close/1</a></td><td>Close a TCP socket.</td></tr><tr><td valign="top"><a href="#connect-3">connect/3</a></td><td></td></tr><tr><td valign="top"><a href="#connect-4">connect/4</a></td><td></td></tr><tr><td valign="top"><a href="#controlling_process-2">controlling_process/2</a></td><td>Assign a new controlling process <em>Pid</em> to <em>Socket</em>.</td></tr><tr><td valign="top"><a href="#messages-1">messages/1</a></td><td>Atoms used to identify messages in {active, once | true} mode.</td></tr><tr><td valign="top"><a href="#peername-1">peername/1</a></td><td>Return the address and port for the other end of a connection.</td></tr><tr><td valign="top"><a href="#recv-2">recv/2</a></td><td></td></tr><tr><td valign="top"><a href="#recv-3">recv/3</a></td><td>Receive a packet from a socket in passive mode.</td></tr><tr><td valign="top"><a href="#send-2">send/2</a></td><td>Send a packet on a socket.</td></tr><tr><td valign="top"><a href="#setopts-2">setopts/2</a></td><td>Set one or more options for a socket.</td></tr><tr><td valign="top"><a href="#shutdown-2">shutdown/2</a></td><td>Immediately close a socket in one or two directions.</td></tr><tr><td valign="top"><a href="#sockname-1">sockname/1</a></td><td>Get the local address and port of a socket.</td></tr></table>


<a name="functions"></a>

## Function Details ##

<a name="check_hostname_opts-1"></a>

### check_hostname_opts/1 ###

`check_hostname_opts(Host0) -> any()`

<a name="cipher_opts-0"></a>

### cipher_opts/0 ###

`cipher_opts() -> any()`

<a name="cipher_opts-0"></a>

### cipher_opts/0 ###

`cipher_opts() -> any()`

<a name="close-1"></a>

### close/1 ###
Expand Down
Loading

0 comments on commit 8bb529e

Please sign in to comment.