-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
forward trailers on error only if client send TE header #1499
Conversation
Hi Mikhail, thanks for your PR! This looks really great, and of course we should abide by the relevant standards. Could you add some comments to the code to the relevant sections of the RFC, just so we have it in the code as well? It also looks like we may need to add the Thanks! |
Hello Johan! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It still looks like we need to change the integration tests to account for this change. Could you please add the TE
header to the tests that are failing?
runtime/errors.go
Outdated
//RFC 7230 https://tools.ietf.org/html/rfc7230#section-4.1.2 | ||
//Unless the request includes a TE header field indicating "trailers" | ||
//is acceptable, as described in Section 4.3, a server SHOULD NOT | ||
//generate trailer fields that it believes are necessary for the user | ||
//agent to receive. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: please add a space after the //
since that is the convention.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done ;)
Done! Maybe not the best solution, but it works as expected :) |
|
Hm, looks like the CLA bot is stuck... could you try to prompt it by saying |
NVM there we go! |
Thanks for your contribution! Could you please cherry pick this against the v2 branch? |
Done! #1507 |
This PR fixes linkerd/linkerd2#4714 and fixes hyperium/hyper#2171
According to RFC7230, server should send trailers only if client send TE header hyperium/hyper#2171 (comment)