fix: return set-cookie values consistently by lin-hongkuan · Pull Request #11037 · axios/axios · GitHub
Skip to content

fix: return set-cookie values consistently#11037

Open
lin-hongkuan wants to merge 1 commit into
axios:v1.xfrom
lin-hongkuan:codex/getsetcookie-array
Open

fix: return set-cookie values consistently#11037
lin-hongkuan wants to merge 1 commit into
axios:v1.xfrom
lin-hongkuan:codex/getsetcookie-array

Conversation

@lin-hongkuan

@lin-hongkuan lin-hongkuan commented Jun 24, 2026

Copy link
Copy Markdown

Summary

Makes AxiosHeaders#getSetCookie() return an array for both raw parsed headers and programmatic single-value headers.

Linked issue

N/A

Changes

  • Wrap a single set-cookie value in an array.
  • Keep existing array and missing-header behavior unchanged.
  • Add a regression test for programmatic headers.set("set-cookie", ...).

Validation

  • npm run test:vitest:unit -- tests/unit/axiosHeaders.test.js
  • npm run lint -- lib/core/AxiosHeaders.js
  • git diff --check

Checklist

  • Tests added or updated (or N/A with reason)
  • Docs/types updated if public API changed (index.d.ts and index.d.cts)
  • No breaking changes (or called out explicitly above)

🏄

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

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