diff --git a/lib/includes/nghttp2/nghttp2.h b/lib/includes/nghttp2/nghttp2.h index 8563a0a0..0b956a3e 100644 --- a/lib/includes/nghttp2/nghttp2.h +++ b/lib/includes/nghttp2/nghttp2.h @@ -40,13 +40,13 @@ extern "C" { * * The protocol version identification of this library supports. */ -#define NGHTTP2_PROTO_VERSION_ID "HTTP-draft-09/2.0" +#define NGHTTP2_PROTO_VERSION_ID "h2-10" /** * @macro * * The length of :macro:`NGHTTP2_PROTO_VERSION_ID`. */ -#define NGHTTP2_PROTO_VERSION_ID_LEN 17 +#define NGHTTP2_PROTO_VERSION_ID_LEN 5 struct nghttp2_session; /** diff --git a/tests/nghttp2_npn_test.c b/tests/nghttp2_npn_test.c index 5bb10fdc..d49865fe 100644 --- a/tests/nghttp2_npn_test.c +++ b/tests/nghttp2_npn_test.c @@ -33,14 +33,13 @@ static void http2(void) { const unsigned char p[] = { 8, 'h', 't', 't', 'p', '/', '1', '.', '1', - 17, 'H', 'T', 'T', 'P', '-', 'd', 'r', 'a', 'f', 't', '-', '0', '9', '/', - '2', '.', '0', + 5, 'h', '2', '-', '1', '0', 6, 's', 'p', 'd', 'y', '/', '3' }; unsigned char outlen; unsigned char* out; CU_ASSERT(1 == nghttp2_select_next_protocol(&out, &outlen, p, sizeof(p))); - CU_ASSERT(17 == outlen); + CU_ASSERT(NGHTTP2_PROTO_VERSION_ID_LEN == outlen); CU_ASSERT(memcmp(NGHTTP2_PROTO_VERSION_ID, out, outlen) == 0); }