Skip to content

fix: preserve duplicate response headers#14

Merged
StopMakingThatBigFace merged 3 commits into
mainfrom
feat/v2.4.1
May 29, 2026
Merged

fix: preserve duplicate response headers#14
StopMakingThatBigFace merged 3 commits into
mainfrom
feat/v2.4.1

Conversation

@StopMakingThatBigFace
Copy link
Copy Markdown
Owner

@StopMakingThatBigFace StopMakingThatBigFace commented May 29, 2026

📝 Description

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.

Build & CI

  • Limited the test workflow to run only when code, package metadata, Rust sources, scripts, TypeScript config, or the test workflow itself changes.
  • Limited the native build workflow on pull requests to run only when native build inputs, package metadata, scripts, or the build workflow itself changes.
  • Documentation-only changes such as README.md, docs/**, issue templates, and skill files no longer trigger the test or native build CI workflows.

🎯 Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 📚 Documentation update
  • 🔧 Build/CI configuration

@StopMakingThatBigFace StopMakingThatBigFace merged commit 9f08137 into main May 29, 2026
16 checks passed
@StopMakingThatBigFace StopMakingThatBigFace deleted the feat/v2.4.1 branch May 29, 2026 12:57
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.

1 participant