1_7_3.md

doc/release_notes/1_7_3.md

1.7.3

Improvements

cookies plugin: Jar as CookieStore

While previously an implementation detail, the cookie jar from a :cookie plugin-enabled session can now be manipulated by the end user:

cookies_sess = HTTPX.plugin(:cookies)

jar = cookies.make_jar

sess = cookies_ses.with(cookies: jar)

# perform requests using sess, get/set/delete cookies in jar

The jar API now closely follows the Web Cookie Store API, by providing the same set of functions.

Some API backwards compatibility is maintained, however since this was an internal implementation detail, this effort isn’t meant to be thorough.

Bugfixes

  • http-2: clear buffered data chunks when receiving a GOAWAY stream frame; without this, the client kept sending the corresponding DATA frames, despite the peer server making it known that it wouldn’t process it. While this is valid HTTP/2, this could increase the connection window until a point where it’d go over the max frame size. this issue was observed during large file uploads where the first request could fail and make the client renegotiate.

  • webmock adapter: fixed response body length accounting which was making response.body.empty? return true for responses with payload.

  • :rate_limiter plugin relies on an internal refactoring to be able to wait for the time suggested by the peer server instead of the potentially relying on custom user logic via own :retry_after.

  • :fiber_concurrency: fix wrong names for native/system resolver overrides.

  • connection: fix for race condition when closing the connection, where the state only transitions to closed after checking the connection back in to the pool, potentially corrupting it if another session meanwhile has picked it up and manipulated it.