Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

always update thrift header write list in headerbp client middleware #685

Merged
merged 2 commits into from
Feb 20, 2025

Conversation

pacejackson
Copy link
Contributor

💸 TL;DR

This is really just to make the code cleaner since it technically works because thrift.GetWriteHeaderList returns the underlying list, not a copy, and slices.Delete deletes from the source slice. I think the code is a lot clearer and less likely to have a bug later if we always set the outgoing header list.

I verified this by adding a test case. The test passes without my changes, but it fails if I copy outgoing before deleting the headers from it.

@pacejackson pacejackson requested a review from a team as a code owner February 19, 2025 22:01
@pacejackson pacejackson requested review from fishy, kylelemons and konradreiche and removed request for a team February 19, 2025 22:01
@pacejackson pacejackson merged commit ddd6634 into reddit:master Feb 20, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants