Set protocol version draft-06

This commit is contained in:
Tatsuhiro Tsujikawa 2013-08-22 21:33:29 +09:00
parent 2764c55678
commit d154faa9ab
2 changed files with 3 additions and 3 deletions

View File

@ -40,7 +40,7 @@ extern "C" {
* *
* The protocol version identification of this library supports. * The protocol version identification of this library supports.
*/ */
#define NGHTTP2_PROTO_VERSION_ID "HTTP-draft-04/2.0" #define NGHTTP2_PROTO_VERSION_ID "HTTP-draft-06/2.0"
/** /**
* @macro * @macro
* *

View File

@ -32,7 +32,7 @@ static void http2(void)
{ {
const unsigned char p[] = { const unsigned char p[] = {
8, 'h', 't', 't', 'p', '/', '1', '.', '1', 8, 'h', 't', 't', 'p', '/', '1', '.', '1',
17, 'H', 'T', 'T', 'P', '-', 'd', 'r', 'a', 'f', 't', '-', '0', '4', '/', 17, 'H', 'T', 'T', 'P', '-', 'd', 'r', 'a', 'f', 't', '-', '0', '6', '/',
'2', '.', '0', '2', '.', '0',
6, 's', 'p', 'd', 'y', '/', '3' 6, 's', 'p', 'd', 'y', '/', '3'
}; };
@ -40,7 +40,7 @@ static void http2(void)
unsigned char* out; unsigned char* out;
CU_ASSERT(1 == nghttp2_select_next_protocol(&out, &outlen, p, sizeof(p))); CU_ASSERT(1 == nghttp2_select_next_protocol(&out, &outlen, p, sizeof(p)));
CU_ASSERT(17 == outlen); CU_ASSERT(17 == outlen);
CU_ASSERT(memcmp("HTTP-draft-04/2.0", out, outlen) == 0); CU_ASSERT(memcmp("HTTP-draft-06/2.0", out, outlen) == 0);
} }
static void http11(void) static void http11(void)