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

Send trailers only when TE: trailers is set #2124

Merged
merged 6 commits into from
May 18, 2021
Merged

Send trailers only when TE: trailers is set #2124

merged 6 commits into from
May 18, 2021

Conversation

zoido
Copy link
Contributor

@zoido zoido commented May 4, 2021

References to other Issues or PRs

Fixes #1709

Have you read the Contributing Guidelines?

Yes.

Brief description of what is fixed or changed

Sends trailers back only when client specifies TE: trailers.

Other comments

I borrowed the code from errors.go from #1499 as well as the approach to the tests.
I was thinking about increasing the reuse but did not figure out anything elegant. Will gladly adjust.

@google-cla google-cla bot added the cla: yes label May 4, 2021
@zoido zoido changed the title Zoido/dont send trailers without te Send trailers only when TE: trailers is set May 4, 2021
@zoido zoido marked this pull request as ready for review May 4, 2021 19:49
@codecov-commenter
Copy link

Codecov Report

Merging #2124 (0e836c1) into master (4192d5e) will decrease coverage by 0.09%.
The diff coverage is 14.28%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2124      +/-   ##
==========================================
- Coverage   58.19%   58.09%   -0.10%     
==========================================
  Files          35       35              
  Lines        3846     3852       +6     
==========================================
  Hits         2238     2238              
- Misses       1338     1342       +4     
- Partials      270      272       +2     
Impacted Files Coverage Δ
runtime/handler.go 40.74% <14.28%> (-2.40%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4192d5e...0e836c1. Read the comment docs.

Copy link
Collaborator

@adambabik adambabik left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! LGTM

runtime/handler.go Outdated Show resolved Hide resolved
examples/internal/integration/integration_test.go Outdated Show resolved Hide resolved
Copy link
Contributor Author

@zoido zoido left a comment

Choose a reason for hiding this comment

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

Comments and suggestions addressed. PTAL.

examples/internal/integration/integration_test.go Outdated Show resolved Hide resolved
runtime/handler.go Outdated Show resolved Hide resolved
@zoido zoido requested a review from adambabik May 5, 2021 16:23
@zoido
Copy link
Contributor Author

zoido commented May 18, 2021

Apologies for bothering. Are there any plans for this PR to be merged? Is there anything I should improve in order to enable the merge?

@johanbrandhorst johanbrandhorst merged commit ea9e1d6 into grpc-ecosystem:master May 18, 2021
@johanbrandhorst
Copy link
Collaborator

Apologies for bothering. Are there any plans for this PR to be merged? Is there anything I should improve in order to enable the merge?

Sorry this was delayed, thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow client to disable sending of trailers by omitting "TE" header.
4 participants