Skip to content

34411 HTTP/2 and HTTP/3: Response trailers collection not reset #37627

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

Merged
merged 2 commits into from
Oct 26, 2021

Conversation

ladeak
Copy link
Contributor

@ladeak ladeak commented Oct 17, 2021

34411 HTTP/2 and HTTP/3: Response trailers collection not reset

This is a follow up on discussion: "would the trailers field get reset between requests"

Description

  • Resetting user set Trailers on H2 and H3 Stream's OnReset() methods
  • Adding a unit tests that covers if the stream is reset or not

Fixes #34411

- Resetting user set Trailers on H2 and H3 Stream's OnReset() methods
- Adding a unit tests that covers if the stream is reset or not
@ghost ghost added area-runtime community-contribution Indicates that the PR has been added by a community member labels Oct 17, 2021
@ladeak
Copy link
Contributor Author

ladeak commented Oct 19, 2021

@JamesNK and @halter73 may I ask for a review?

Copy link
Member

@JamesNK JamesNK left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@halter73 @Tratcher Could you double-check this is ok before it is merged


Assert.NotNull(trailersFirst);
Assert.NotNull(trailersSecond);
Assert.NotSame(trailersFirst, trailersSecond);
Copy link
Member

Choose a reason for hiding this comment

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

Can this test be merged with ResponseTrailers_MultipleStreams_Reset? It'd also be nice to get coverage in the HTTP/3 tests to verify that the built-in trailers dictionary is cleared if there isn't already.

Copy link
Contributor Author

@ladeak ladeak Oct 25, 2021

Choose a reason for hiding this comment

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

Yes, I can merge the two. Not sure what you mean by the HTTP3 part though.
EDIT: I think I know what you mean, ack

Copy link
Member

@halter73 halter73 left a comment

Choose a reason for hiding this comment

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

I also like moving _userTrailers = null up. Thanks @ladeak!

@shirhatti
Copy link
Contributor

@ladeak Do you mind updating the PR with the suggestions? We'd like to merge this and appreciate your contribution!

@ladeak
Copy link
Contributor Author

ladeak commented Oct 25, 2021

Yes, let me add the suggestion in the next few days.

@ladeak
Copy link
Contributor Author

ladeak commented Oct 26, 2021

@shirhatti I have followed up on the comments and pushed an update.

@halter73 halter73 merged commit f3b0c98 into dotnet:main Oct 26, 2021
@ghost ghost added this to the 7.0-preview1 milestone Oct 26, 2021
@halter73
Copy link
Member

Thanks @ladeak!

@ladeak ladeak deleted the ladeak_34411 branch October 26, 2021 19:39
@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTTP/2 and HTTP/3: Response trailers collection not reset
6 participants