Skip to content

Spec clarification about multi-value custom metadata -> HTTP/2 headers #1691

Open
@pcwiese

Description

@pcwiese

I have 2 questions:

Given the following set of custom metadata added

var metadata = new Metadata();
metadata.Add(new Metadata.Entry("foo", "bar1"));
metadata.Add(new Metadata.Entry("foo", "bar2"));

I see that under the covers, headers are combined into a single header with multiple values using this class
HttpRequestHeaders

and produces a single header

foo: bar1,bar2

Per the spec gRPC over HTTP/2 it seems like this is a perfectly reasonable thing to do, however this behavior differs from what a Grpc.Core or Grpc-Go client sends. Those send multiple "foo" HTTP/2 headers (verified with a network capture).

Is either method of sending a multi-value header allowed?

If that is true, my other question is if a gRPC server receives HTTP/2 headers in either form are they semantically the same? e.g. Should a multi-value header show up as multiple metadata items or a single one with a comma-separate value, or either one, all of which are semantically equivalent. If they are equivalent it means that its always the metadata consumer's responsibility to attempt to comma-unseparate anything that could be a multi-value header.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions