Skip to content

feat(client): update client headers partially rather than overwriting#182

Merged
0x676e67 merged 1 commit intomainfrom
feat
Apr 26, 2025
Merged

feat(client): update client headers partially rather than overwriting#182
0x676e67 merged 1 commit intomainfrom
feat

Conversation

@0x676e67
Copy link
Copy Markdown
Owner

@0x676e67 0x676e67 commented Apr 26, 2025

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the client header logic to merge new header values into existing ones rather than replacing them entirely. Key changes include:

  • Renaming the variable from default_headers to updated_headers in context for clarity.
  • Switching from a full header swap to iterating over new headers and inserting them individually.
  • Updating inline comments to reflect the new partial update behavior.
Comments suppressed due to low confidence (1)

src/async_impl/client.rs:799

  • Changing the header update logic from swapping the entire headers object to iterating and inserting could lead to unintended reordering or duplicate header issues if duplicate keys exist. Please verify that the new merge approach correctly preserves the intended header ordering and handling of duplicate keys.
update = update.headers(|default_headers| {

@0x676e67 0x676e67 changed the title feat(client): update client headers partially rather than overwriting them feat(client): update client headers partially rather than overwriting Apr 26, 2025
@0x676e67 0x676e67 merged commit 1e54936 into main Apr 26, 2025
18 checks passed
@0x676e67 0x676e67 deleted the feat branch April 26, 2025 10:52
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.

2 participants