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

Never encode binary metadata within the metadata map #1188

Merged
merged 2 commits into from
Apr 28, 2017

Conversation

dfawley
Copy link
Member

@dfawley dfawley commented Apr 17, 2017

This change ensures consistency for the user when accessing metadata values: they are never encoded except when sent on the wire. Previously, they would appear encoded to client code, but not to server code. As such, this represents a behavior change, but one unlikely to affect user code, as it's unusual to inspect the metadata after setting it.

Fixes the remaining aspect of #1148 not fixed by #1157.

This change ensures consistency for the user when accessing metadata values:
they are never encoded except when sent on the wire.  Previously, they would
appear encoded to client code, but not to server code.  As such, this
represents a behavior change, but one unlikely to affect user code, as it's
unusual to inspect the metadata after setting it.
@dfawley dfawley added 1.3 Type: API Change Breaking API changes (experimental APIs only!) labels Apr 17, 2017
@@ -40,71 +40,20 @@ import (

const binaryValue = string(128)

func TestEncodeKeyValue(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Move these two tests to http_util_test.go instead of deleting them?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good idea. Done.

@dfawley dfawley merged commit b610ffd into grpc:master Apr 28, 2017
@dfawley dfawley deleted the metadata_bin2 branch July 25, 2017 17:23
@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: API Change Breaking API changes (experimental APIs only!)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants