aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/ext/transport/chttp2/alpn
diff options
context:
space:
mode:
authorGravatar Harvey Tuch <htuch@google.com>2016-10-11 10:04:53 -0400
committerGravatar Harvey Tuch <htuch@google.com>2016-10-24 11:16:15 -0400
commit8cdf17a620a2d0909c1785717d5b3d8cff1248fd (patch)
treedbb3d57d4873a72ec8a4fae155e0e864c7fc487c /src/core/ext/transport/chttp2/alpn
parent1445c479013a997a2fa41bfd09a5219298c4c3d8 (diff)
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.
Diffstat (limited to 'src/core/ext/transport/chttp2/alpn')
-rw-r--r--src/core/ext/transport/chttp2/alpn/alpn.c2
1 files changed, 1 insertions, 1 deletions
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 <grpc/support/useful.h>
/* 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;