Skip to content

Conversation

@arjan
Copy link

@arjan arjan commented Oct 16, 2025

#717, released in 1.24.0, releases/skips the body when a custom pool is used and a redirect (30X) response is received.

However, in this case it still returns {ok, Status, Headers, Client}, leading the HTTPoison library to think it should still fetch the body, which then fails with a req_not_found error.

Reported this downstream but would prefer to have it fixed here.

@benoitc
Copy link
Owner

benoitc commented Jan 18, 2026

Closing: This PR was written for the old hackney architecture. The new gen_statem-based connection architecture (hackney 2.x) handles redirects correctly. For follow_redirect=false, the connection pid is returned and callers should use hackney:skip_body/1 to release it to the pool. See test test_307_redirect_pool_cleanup for the expected behavior.

@benoitc benoitc closed this Jan 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants