|
1 | 1 | # NEWS |
2 | 2 |
|
| 3 | +2.0.0 - 2026-01-20 |
| 4 | +------------------ |
| 5 | + |
| 6 | +This release finalizes the 2.0 architecture with many bug fixes and new features since beta.1. |
| 7 | + |
| 8 | +See [Migration Guide](guides/MIGRATION.md) and [Design Guide](guides/design.md) for details. |
| 9 | + |
| 10 | +### New Features |
| 11 | + |
| 12 | +- **HTTP 1xx informational responses** (#631) - Support for handling 103 Early Hints and other informational responses |
| 13 | +- **HTTPS proxy support** (#795) - Full support for proxying through HTTPS proxies |
| 14 | +- **Proxy authentication callback** (#799) - New `proxy_auth_fun` option for custom proxy authentication logic |
| 15 | +- **CONNECT response callback** (#798) - New `on_connect_response` callback to inspect CONNECT proxy response headers |
| 16 | +- **SSL peer certificate** (#599) - New `hackney:peercert/1` function to get the peer's SSL certificate |
| 17 | + |
| 18 | +### New Options |
| 19 | + |
| 20 | +- `auto_decompress` - When `true`, automatically decompresses gzip/deflate responses (#155): |
| 21 | + ```erlang |
| 22 | + {ok, Status, Headers, Body} = hackney:request(get, URL, [], [], |
| 23 | + [{with_body, true}, {auto_decompress, true}]). |
| 24 | + ``` |
| 25 | +- `stream_to` - For async requests, the `stream_to` process is now set as the connection owner (#646). If `stream_to` dies, the connection terminates; if the original caller dies, the connection continues as long as `stream_to` is alive. |
| 26 | +- `proxy_auth_fun` - Callback function for custom proxy authentication |
| 27 | +- `on_connect_response` - Callback to receive CONNECT proxy response headers |
| 28 | + |
| 29 | +### New Functions |
| 30 | + |
| 31 | +- `hackney:peercert/1` - Get the peer's SSL certificate from a connection |
| 32 | + |
| 33 | +### Bug Fixes |
| 34 | + |
| 35 | +- fix: handle non-HTTP URL schemes properly (#468) |
| 36 | +- fix: force connection close for 204/304 responses (#434) |
| 37 | +- fix: sanitize header values to prevent HTTP header injection (#506) |
| 38 | +- fix: filter Host header for HTTP/2 requests (send as `:authority` pseudo-header) |
| 39 | +- fix: handle non-standard decimal status codes (#697) |
| 40 | +- fix: remove parse_trans from runtime dependencies (#714) |
| 41 | +- fix: handle race condition in get_protocol calls |
| 42 | +- fix: strip auth credentials on cross-host redirects (#701) |
| 43 | +- fix: tolerate trailing semicolons in parameter parsing (#618) |
| 44 | +- fix: handle @ symbols in URL credentials per RFC 3986 (#657) |
| 45 | +- fix: properly resolve relative redirect URLs per RFC 3986 (#711) |
| 46 | +- fix: detect server-initiated closes on idle pooled connections (#544) |
| 47 | +- fix: respect recv_timeout during proxy CONNECT handshake |
| 48 | +- fix: prevent SOCKS5 and HTTP CONNECT tunnels from being pooled (#797) |
| 49 | + |
| 50 | +### Security |
| 51 | + |
| 52 | +- Header injection prevention (#506) - Header values are now sanitized to prevent CRLF injection attacks |
| 53 | +- Auth credential stripping (#701) - Authorization headers and credentials are stripped when redirecting to a different host |
| 54 | + |
| 55 | +--- |
| 56 | + |
3 | 57 | 2.0.0-beta.1 - 2026-01-07 |
4 | 58 | ------------------------- |
5 | 59 |
|
@@ -67,12 +121,6 @@ The connection pool has been completely redesigned: |
67 | 121 | - `max_per_host` - Maximum concurrent connections per host (default 50) |
68 | 122 | - `checkout_timeout` - Timeout to acquire connection slot (default 8000ms) |
69 | 123 | - `prewarm_count` - Warm connections per host (default 4) |
70 | | -- `auto_decompress` - When `true`, automatically decompresses gzip/deflate responses (#155): |
71 | | - ```erlang |
72 | | - {ok, Status, Headers, Body} = hackney:request(get, URL, [], [], |
73 | | - [{with_body, true}, {auto_decompress, true}]). |
74 | | - ``` |
75 | | -- `stream_to` - For async requests, the `stream_to` process is now set as the connection owner (#646). If `stream_to` dies, the connection terminates; if the original caller dies, the connection continues as long as `stream_to` is alive. |
76 | 124 |
|
77 | 125 | ### New Functions |
78 | 126 |
|
|
0 commit comments