add C# constant for GRPC_COMPRESSION_REQUEST_ALGORITHM_MD_KEY

pull/6991/head
Jan Tattermusch 9 years ago
parent 9fc079fddd
commit 606e35a4fb
  1. 2
      src/csharp/Grpc.Core.Tests/CompressionTest.cs
  2. 7
      src/csharp/Grpc.Core/Metadata.cs
  3. 2
      src/csharp/Grpc.IntegrationTesting/InteropClient.cs

@ -125,7 +125,7 @@ namespace Grpc.Core.Tests
{
var compressionMetadata = new Metadata
{
{ new Metadata.Entry("grpc-internal-encoding-request", "gzip") }
{ new Metadata.Entry(Metadata.CompressionRequestAlgorithmMetadataKey, "gzip") }
};
helper.UnaryHandler = new UnaryServerMethod<string, string>(async (req, context) =>

@ -63,6 +63,13 @@ namespace Grpc.Core
/// </summary>
public static readonly Metadata Empty = new Metadata().Freeze();
/// <summary>
/// To be used in initial metadata to request specific compression algorithm
/// for given call. Direct selection of compression algorithms is an internal
/// feature and is not part of public API.
/// </summary>
internal const string CompressionRequestAlgorithmMetadataKey = "grpc-internal-encoding-request";
readonly List<Entry> entries;
bool readOnly;

@ -724,7 +724,7 @@ namespace Grpc.IntegrationTesting
var algorithmName = compressed ? "gzip" : "identity";
return new Metadata
{
{ new Metadata.Entry("grpc-internal-encoding-request", algorithmName) }
{ new Metadata.Entry(Metadata.CompressionRequestAlgorithmMetadataKey, algorithmName) }
};
}

Loading…
Cancel
Save