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

Account for header type when removing headers #1335

Merged
merged 2 commits into from
Oct 28, 2021

Conversation

MihaZupan
Copy link
Member

Fixes #1334

Unlike TryAddWithoutValidation, HttpHeaders.Remove will throw if the header name does not belong to the header collection type.

As a result, trying to remove foo from content headers or trying to remove Content-Encoding from request headers will result in an exception.

Instead of trying to remove the header from both collections, we should check which collection the header belongs to first.

@MihaZupan MihaZupan added this to the YARP 1.0.0 milestone Oct 28, 2021
@MihaZupan MihaZupan requested a review from Tratcher as a code owner October 28, 2021 15:11
@MihaZupan MihaZupan merged commit e811677 into microsoft:main Oct 28, 2021
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.

Removing header from backend request causes exception
2 participants