From 8cdf17a620a2d0909c1785717d5b3d8cff1248fd Mon Sep 17 00:00:00 2001 From: Harvey Tuch Date: Tue, 11 Oct 2016 10:04:53 -0400 Subject: Introduce a grpc-exp ALPN protocol identifier. This patch introduces an additional ALPN protocol, grpc-exp, intended to take preference to h2 and indicate to the server that the connection contains only gRPC traffic. This allows servers and intermediate boxes to distinguish gRPC from other HTTP/2 traffic. The choice of grpc-exp as a protocol identifier indicates that this scheme is currently experimental and should not be relied upon. The protocol is not in the IANA TLS registry. This patch also introduces client/server handshake tests that validate the preferential treatment of grpc-exp in an end-to-end manner. --- src/core/ext/transport/chttp2/alpn/alpn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/ext/transport') diff --git a/src/core/ext/transport/chttp2/alpn/alpn.c b/src/core/ext/transport/chttp2/alpn/alpn.c index 48b0217265..55710dc5ae 100644 --- a/src/core/ext/transport/chttp2/alpn/alpn.c +++ b/src/core/ext/transport/chttp2/alpn/alpn.c @@ -36,7 +36,7 @@ #include /* in order of preference */ -static const char *const supported_versions[] = {"h2"}; +static const char *const supported_versions[] = {"grpc-exp", "h2"}; int grpc_chttp2_is_alpn_version_supported(const char *version, size_t size) { size_t i; -- cgit v1.2.3