Skip to content

v0.2.7

Choose a tag to compare

@benoitc benoitc released this 10 Jun 21:29
· 69 commits to main since this release

Maintenance release: a Hex resolution fix, an HTTP/1.1 WebSocket header fix, and a push-streaming mode for the HTTP client.

Added

  • livery_client push streaming. Pass stream_to => Pid (with stream => true) and the response is delivered to Pid as ordered messages ({livery_response, Ref, {status, Status, Headers}}, {chunk, Binary}, done, {error, Reason}), so one process can interleave body chunks with its own control messages in a selective receive instead of dedicating a process to a blocking read loop. flow => manual sends one chunk per stream_next/1 for backpressure; stop_stream/1 cancels and drops the connection. The livery_client_adapter behaviour gains optional stream/3, stream_next/1, and stop_stream/1 callbacks. The pull-based {stream, Reader} + read/2 API is unchanged.

Fixed

  • The package now resolves on Hex (#49). The published dependency pins conflicted: barrel_mcp 2.2.0 required hackney 4.0.3 / h2 0.6.1 / erlang_h1 ~>0.2.3, and hackney 4.2.2 required h2 0.8.0, neither of which agrees with Livery's own pins. The dependency bumps below put the whole graph on h2 0.9.0.
  • HTTP/1.1 WebSocket upgrade: the 101 Switching Protocols response no longer carries duplicate Connection/Upgrade headers, which spec-strict clients (Safari, undici) reject. Fixed upstream in erlang_h1 0.6.1, which now owns those framing headers and strips any caller-supplied copies.

Changed

  • Bump dependencies onto a mutually compatible set:
    • barrel_mcp 2.2.0 -> 2.2.2 (now requires hackney 4.2.3 / h2 0.9.0 / erlang_h1 ~>0.6.1)
    • erlang_h1 0.6.0 -> 0.6.1
    • hackney 4.2.2 -> 4.2.3 (now requires h2 0.9.0)
    • webtransport 0.3.2 -> 0.3.3