Declare HTTP-draft-07/2.0

This commit is contained in:
Tatsuhiro Tsujikawa 2013-10-27 23:16:49 +09:00
parent bfa7dfb37e
commit 683253e334
3 changed files with 18 additions and 27 deletions

View File

@ -4,40 +4,30 @@ nghttp2 - HTTP/2.0 C Library
This is an experimental implementation of Hypertext Transfer Protocol
version 2.0.
This branch implements HPACK-draft-04
(http://tools.ietf.org/html/draft-ietf-httpbis-header-compression-04).
There are command-line header compression test tools in hdtest
directory. Check out deflatehd and inflatehd commands.
With these changes, the implemented protocol is not compatible with
HTTP-draft-06/2.0. Therefore, this branch uses
HTTP-nghttp2hpack-06/2.0 as protocol identifier. The following section
does not reflect this protocl identifier change. Read it by replacing
HTTP-draft-06/2.0 with HTTP-nghttp2hpack-06/2.0.
Development Status
------------------
We started to implement HTTP-draft-06/2.0
(http://tools.ietf.org/html/draft-ietf-httpbis-http2-06) and the
We started to implement HTTP-draft-07/2.0
(http://tools.ietf.org/html/draft-ietf-httpbis-http2-07) and the
header compression
(http://tools.ietf.org/html/draft-ietf-httpbis-header-compression-03).
(http://tools.ietf.org/html/draft-ietf-httpbis-header-compression-07).
The nghttp2 code base was forked from spdylay project.
=================== =================
Features HTTP-draft-06/2.0
=================== =================
Flow Control Done
Header Compression Done
Reprioritization Done
========================== =================
Features HTTP-draft-07/2.0
========================== =================
:authority Done
HPACK-draft-04 Done
SETTINGS_HEADER_TABLE_SIZE Done
SETTINGS_ENABLE_PUSH
FRAME_SIZE_ERROR Done
Header Continuation
Server Push Done
HTTP Upgrade Done
ALPN
NPN Done
=================== =================
========================== =================
Public Test Server
------------------

View File

@ -40,13 +40,13 @@ extern "C" {
*
* The protocol version identification of this library supports.
*/
#define NGHTTP2_PROTO_VERSION_ID "HTTP-nghttp2hpack-06/2.0"
#define NGHTTP2_PROTO_VERSION_ID "HTTP-draft-07/2.0"
/**
* @macro
*
* The length of :macro:`NGHTTP2_PROTO_VERSION_ID`.
*/
#define NGHTTP2_PROTO_VERSION_ID_LEN 24
#define NGHTTP2_PROTO_VERSION_ID_LEN 17
struct nghttp2_session;
/**

View File

@ -24,22 +24,23 @@
*/
#include "nghttp2_npn_test.h"
#include <string.h>
#include <CUnit/CUnit.h>
#include <nghttp2/nghttp2.h>
#include <string.h>
static void http2(void)
{
const unsigned char p[] = {
8, 'h', 't', 't', 'p', '/', '1', '.', '1',
24, 'H', 'T', 'T', 'P', '-', 'n', 'g', 'h', 't', 't', 'p', '2', 'h', 'p', 'a', 'c', 'k', '-', '0', '6', '/',
17, 'H', 'T', 'T', 'P', '-', 'd', 'r', 'a', 'f', 't', '-', '0', '7', '/',
'2', '.', '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(24 == outlen);
CU_ASSERT(17 == outlen);
CU_ASSERT(memcmp(NGHTTP2_PROTO_VERSION_ID, out, outlen) == 0);
}