Skip to content

Copy header names before retaining them in the case index - #1699

Closed
OskarEichler wants to merge 0 commit into
lostisland:mainfrom
OskarEichler:codex/copy-indexed-header-names
Closed

OskarEichler wants to merge 0 commit into
lostisland:mainfrom
OskarEichler:codex/copy-indexed-header-names

Conversation

@OskarEichler

Copy link
Copy Markdown
Contributor

Summary

Copy names before retaining them in the case-preserving index.

Reproduction and verification

Directly insert with a mutable string key, mutate that caller string, then look up the original lowercase name. Baseline returns nil; the fix retains the header. Verified spelling, case-insensitive replacement and deletion.

  • Individual patch: 6 focused Faraday checks passed (keycopy); all 639 existing RSpec examples pass; changed-file RuboCop and Ruby syntax pass.
  • Combined installed-release-based branch: 639 existing examples, 1,124 focused checks, full RuboCop (75 files), YARD checks and gem packaging pass.
  • External faraday-net_http adapter suite: 386 existing examples, zero failures with the combined fixes.
  • Ruby 4.0.6 through rbenv. No production or live external HTTP operations.

Limitations

No test/spec files were added or changed because the originating repository explicitly forbids this. Reproductions ran outside the repository. This differs from Faraday's requested regression-test contribution convention and is disclosed for maintainer review. Other Ruby versions/platforms were not run locally. This PR includes only the focused source change; the other fixes and the consumer's separately verified merged JSON decoder patch #1687 are not added here.

Breaking-change notes

No API change. Caller strings remain mutable; their mutation no longer corrupts the per-header index.

@OskarEichler
OskarEichler force-pushed the codex/copy-indexed-header-names branch from b8abc18 to b25b1b2 Compare August 28, 2026 11:12

This branch was previously deployed

1 inactive deployment
github-pages — b25b1b26 Deployed Aug 12, 2026 by olleolleolle via deploy #223
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