Skip to content

Conversation

Kahbazi
Copy link
Member

@Kahbazi Kahbazi commented Dec 13, 2021

Fixes #1409

static HttpTransformer()
{
Default = TransformBuilder.CreateTransformer(new TransformBuilderContext());
Empty = new HttpTransformer();
Copy link
Member

Choose a reason for hiding this comment

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

Can we change this to not use the static ctor? I don't think there's anything preventing these fields from being initialized inline.

@greenEkatherine
Copy link
Contributor

@Kahbazi thanks for your PR. I was actually working on it as well, that's why I self-assigned, but I forgot to remove the "help wanted" label. I will add a test for this change after it is merged.

public static readonly HttpTransformer Default;

/// <summary>
/// A default set of transforms that copies all request and response fields and headers, except for some
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
/// A default set of transforms that copies all request and response fields and headers, except for some
/// An empty transformer that copies all request and response fields and headers, except for some

@Kahbazi
Copy link
Member Author

Kahbazi commented Dec 13, 2021

@Kahbazi thanks for your PR. I was actually working on it as well, that's why I self-assigned, but I forgot to remove the "help wanted" label. I will add a test for this change after it is merged.

Sorry, I didn't notice the Assignees of the issue.

@Tratcher Tratcher added this to the YARP 1.1.0 milestone Dec 13, 2021
@Tratcher Tratcher merged commit b04c50c into dotnet:main Dec 13, 2021
@Kahbazi Kahbazi deleted the patch-5 branch December 13, 2021 20:20
@MihaZupan MihaZupan modified the milestones: YARP 1.1.0, YARP 1.1.0-RC1 Mar 2, 2022
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.

Behavior of HttpTransformer.Default should match the behavior of new HttpTransformer() or be moved/renamed

4 participants