Skip to content

v2.4.1

Choose a tag to compare

@StopMakingThatBigFace StopMakingThatBigFace released this 29 May 12:58
· 12 commits to main since this release
9f08137

Release Notes

Added

  • Added Headers.getSetCookie() to return raw Set-Cookie response header values as an array, matching modern Node/undici-style fetch behavior.
const cookies = response.headers.getSetCookie();
// ["session=abc123; Path=/", "csrf=token123; Path=/"]

Fixed

  • Fixed duplicate response headers being dropped by the native transport. Response headers are now passed from the native layer as ordered [name, value] tuples instead of a plain object, so repeated headers are preserved.
  • response.headers.get(name) now returns comma-joined values for repeated headers, matching fetch behavior.
response.headers.get('x-dupe');
// "one, two"
  • response.headers.get('set-cookie') now preserves all received Set-Cookie values in the joined header view, while response.headers.getSetCookie() and response.wreq.setCookies expose the raw cookie header array.
  • Response.clone() now preserves duplicate response headers instead of collapsing them through object conversion.

Tests

  • Added coverage for repeated response headers, repeated Set-Cookie headers, Headers.getSetCookie(), and cloned responses.