Skip to content

fix(headers): trim trailing CRLF in normalized header values#7456

Merged
jasonsaayman merged 1 commit intoaxios:v1.xfrom
aviu16:codex/fix-7455-trim-cr-header-values
Mar 1, 2026
Merged

fix(headers): trim trailing CRLF in normalized header values#7456
jasonsaayman merged 1 commit intoaxios:v1.xfrom
aviu16:codex/fix-7455-trim-cr-header-values

Conversation

@aviu16
Copy link
Copy Markdown
Contributor

@aviu16 aviu16 commented Feb 28, 2026

Summary

  • trim trailing \r/\n from normalized header values in AxiosHeaders
  • preserve existing behavior for null/false and array values
  • add regression tests for object and iterable header sources that include trailing CRLF

Why

Issue #7455 reports response header values containing trailing carriage-return characters (\r) after upgrade.

Testing

  • npm run test:mocha -- test/unit/core/AxiosHeaders.js

Fixes #7455

Copy link
Copy Markdown
Contributor

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

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.

@aviu16
Copy link
Copy Markdown
Contributor Author

aviu16 commented Feb 28, 2026

Quick follow-up: this is a narrow normalization fix with targeted regression tests for trailing CR/LF header values. If maintainers want any style or scope adjustment, I can update immediately.

Copy link
Copy Markdown
Member

@jasonsaayman jasonsaayman left a comment

Choose a reason for hiding this comment

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

Hi 👋

This PR LGTM 🔥 !

Thanks for your contribution to axios

@jasonsaayman jasonsaayman added priority::medium A medium priority commit::fix The PR is related to a bugfix labels Mar 1, 2026
@jasonsaayman jasonsaayman merged commit 688826f into axios:v1.x Mar 1, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commit::fix The PR is related to a bugfix priority::medium A medium priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Headers have "\r" character

2 participants