Skip to content

Commit 4d7145f

Browse files
committed
Release 4.7.3
Bundles the fixes merged since 4.7.2 (#914/#915, #918/#919, #920, #921, #922, #924) and the curl-style Content-Length change (#917/#925). Bumps dependencies to their latest releases: quic 1.8.0, webtransport 0.4.4, mimerl 1.5.0, cowboy 2.18.0 (test).
1 parent 0516b9a commit 4d7145f

3 files changed

Lines changed: 30 additions & 7 deletions

File tree

NEWS.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,26 @@
11
# NEWS
22

3-
unreleased
4-
----------
3+
4.7.3 - 2026-08-11
4+
------------------
55

66
### Fixed
77

8+
- Reusing a pooled HTTP/2 or HTTP/3 connection no longer crashes the caller of
9+
`hackney:connect/4` when the pooled connection terminates during the checkout
10+
liveness probe. The `get_state` probe is guarded so a terminating connection
11+
falls through to a fresh one (#914).
12+
- `hackney_url:normalize/2` now rejects a host that reaches an IP literal only
13+
after IDNA folds the Unicode full-stop variants (U+3002/U+FF0E/U+FF61) to
14+
ASCII dots (for example `127。0。0。1` becoming `127.0.0.1`), closing a bypass
15+
of the percent-encoded-IP check.
16+
- The CONNECT proxy handshake rejects CR/LF/NUL in the target host instead of
17+
concatenating it into the request line and `Host` header.
18+
- The pooled HTTPS upgrade bounds the TLS handshake with `connect_timeout`
19+
(`ssl:connect/3`), so a server that stalls the handshake no longer pins the
20+
connection process and its pool slot.
21+
- The streaming request path sanitizes header values (CR/LF) like the buffered
22+
path, and the request method is validated (CR/LF/NUL) at every entry point,
23+
not just the request target.
824
- A response body cut short by the peer closing mid-transfer no longer leaks
925
the connection process. `read_full_body/2` hands back `socket = undefined`,
1026
so the connection went straight to `closed` and never reached the reuse
@@ -19,6 +35,13 @@ unreleased
1935
`noproc` when the connection has already stopped, which would otherwise
2036
propagate out of `hackney:request/5` on the redirect path.
2137

38+
### Changed
39+
40+
- Like curl, an empty body on a body-bearing method (POST/PUT/PATCH) now sends
41+
`Content-Length: 0`; bodyless methods (GET/HEAD/DELETE) are unchanged (#917).
42+
- Update dependencies to their latest releases: `quic` 1.8.0, `webtransport`
43+
0.4.4, `mimerl` 1.5.0, and `cowboy` 2.18.0 for the test suite.
44+
2245
4.7.2 - 2026-07-17
2346
------------------
2447

rebar.config

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,20 +53,20 @@
5353

5454
{deps, [
5555
%% Pure Erlang QUIC + HTTP/3 stack
56-
{quic, "~>1.7.1"},
56+
{quic, "~>1.8.0"},
5757
%% Pure Erlang HTTP/2 stack
5858
{h2, "~>0.11.0"},
5959
%% WebTransport client (HTTP/3 and HTTP/2) - powers the wt_* API
60-
{webtransport, "~>0.4.3"},
60+
{webtransport, "~>0.4.4"},
6161
{idna, "~>7.1.0"},
62-
{mimerl, "~>1.4"},
62+
{mimerl, "~>1.5"},
6363
{certifi, "~>2.17.0"},
6464
{parse_trans, "3.4.2"},
6565
{ssl_verify_fun, "~>1.1.0"}
6666
]}.
6767

6868
{profiles, [{test, [
69-
{deps, [{cowboy, "2.16.0"}, {jsx, "3.1.0"}]},
69+
{deps, [{cowboy, "2.18.0"}, {jsx, "3.1.0"}]},
7070
%% rebar3 can't parse cowboy 2.13+ Elixir-style ">= X and < Y"
7171
%% reqs for cowlib/ranch; override with bare names so rebar3
7272
%% resolves them itself (rebar3#2364).

src/hackney.app.src

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{application, hackney,
55
[
66
{description, "Simple HTTP client with HTTP/1.1, HTTP/2, and HTTP/3 support"},
7-
{vsn, "4.7.2"},
7+
{vsn, "4.7.3"},
88
{registered, [hackney_pool]},
99
{applications, [kernel,
1010
stdlib,

0 commit comments

Comments
 (0)