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

Add a message accept encoding header #1002

Merged
merged 1 commit into from
Sep 17, 2015

Conversation

carl-mastrangelo
Copy link
Contributor

No description provided.


@Override
public String toAsciiString(List<String> values) {
return Joiner.on(',').join(values);
Copy link
Member

Choose a reason for hiding this comment

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

Currently comma is prohibited from being returned by toAsciiString(). We need to figure out what we want to do here post-beta.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, comma is required by the spec. it also leaves no room for a space, which http2 does support I think. Im personally okay with taking multiple header values as in, getting a list back out. Also possible is splitting out csv's on parsing metadata.

Copy link
Member

Choose a reason for hiding this comment

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

Oh, I completely understand that comma is required. But we have to figure out how to do it in our API. Our API currently does allow space.

So the problem is that combining is permitting, but splitting is not. We'll need to figure something out here, but we didn't have enough time before beta.

Copy link
Member

Choose a reason for hiding this comment

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

@ejona86 IIRC the topic of having multiple entries in metadata for the same key has come up before. Should we just defer until we come up with a general solution? For now, assume there is only one value?

Copy link
Member

Choose a reason for hiding this comment

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

@nmittler The last time it came up we deferred until after beta, but chose to prohibit comma for the moment. It is time for us to actually decide on a solution (cross-language).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I looked through RFC 7230 (and 5234) which defines the grammar for header names and values. Strictly speaking, the presence or absence of commas is header field dependent, and not generally required for any header field. I am okay deferring this issue until after beta, but it will still need to be fixed.

@carl-mastrangelo
Copy link
Contributor Author

PTAL

@carl-mastrangelo
Copy link
Contributor Author

@nmittler Could you take a look as well? I am currently blocked with 3 open PRs.

new TestMarshaller<Void>(),
new TestMarshaller<Void>());
final ClientTransport transport = mock(ClientTransport.class);
ClientTransportProvider provider = new TestClientTransportProvider() {
Copy link
Member

Choose a reason for hiding this comment

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

nit: you're overriding the only method ... maybe just new ClientTransportProvider?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, Done!

@nmittler
Copy link
Member

@carl-mastrangelo sorry for the delay! LGTM

@carl-mastrangelo carl-mastrangelo merged commit 4572b19 into grpc:master Sep 17, 2015
@lock lock bot locked as resolved and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants