瀏覽代碼

Add gRPC standard headers to known headers (#24714)

James Newton-King 5 年之前
父節點
當前提交
ffeeb034f5

+ 5 - 0
src/Http/Headers/src/HeaderNames.cs

@@ -44,6 +44,11 @@ namespace Microsoft.Net.Http.Headers
         public static readonly string Expires = "Expires";
         public static readonly string Expect = "Expect";
         public static readonly string From = "From";
+        public static readonly string GrpcAcceptEncoding = "Grpc-Accept-Encoding";
+        public static readonly string GrpcEncoding = "Grpc-Encoding";
+        public static readonly string GrpcMessage = "Grpc-Message";
+        public static readonly string GrpcStatus = "Grpc-Status";
+        public static readonly string GrpcTimeout = "Grpc-Timeout";
         public static readonly string Host = "Host";
         public static readonly string KeepAlive = "Keep-Alive";
         public static readonly string IfMatch = "If-Match";

File diff suppressed because it is too large
+ 160 - 104
src/Servers/Kestrel/Core/src/Internal/Http/HttpHeaders.Generated.cs


+ 5 - 0
src/Servers/Kestrel/shared/KnownHeaders.cs

@@ -42,6 +42,7 @@ namespace CodeGenerator
                 "Cache-Control",
                 "Connection",
                 "Date",
+                "Grpc-Encoding",
                 "Keep-Alive",
                 "Pragma",
                 "Trailer",
@@ -89,6 +90,8 @@ namespace CodeGenerator
                 "Cookie",
                 "Expect",
                 "From",
+                "Grpc-Accept-Encoding",
+                "Grpc-Timeout",
                 "Host",
                 "If-Match",
                 "If-Modified-Since",
@@ -185,6 +188,8 @@ namespace CodeGenerator
             ResponseTrailers = new[]
             {
                 "ETag",
+                "Grpc-Message",
+                "Grpc-Status"
             }
             .Select((header, index) => new KnownHeader
             {

Some files were not shown because too many files changed in this diff