Change protocol ID to h2-13
This commit is contained in:
parent
b53ef8de8f
commit
a5af621947
24
README.rst
24
README.rst
|
@ -16,10 +16,10 @@ We didn't cover everything, but we have Python binding of this libary.
|
||||||
Development Status
|
Development Status
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
We started to implement h2-lc
|
We started to implement h2-13
|
||||||
(http://tools.ietf.org/html/draft-ietf-httpbis-http2-12) and the
|
(http://tools.ietf.org/html/draft-ietf-httpbis-http2-13) and the
|
||||||
header compression
|
header compression
|
||||||
(http://tools.ietf.org/html/draft-ietf-httpbis-header-compression-07).
|
(http://tools.ietf.org/html/draft-ietf-httpbis-header-compression-08).
|
||||||
|
|
||||||
The nghttp2 code base was forked from spdylay project.
|
The nghttp2 code base was forked from spdylay project.
|
||||||
|
|
||||||
|
@ -45,12 +45,12 @@ implementation.
|
||||||
|
|
||||||
* https://nghttp2.org/ (TLS + NPN)
|
* https://nghttp2.org/ (TLS + NPN)
|
||||||
|
|
||||||
NPN offer ``h2-12``, ``spdy/3.1`` and ``http/1.1``.
|
NPN offer ``h2-13``, ``spdy/3.1`` and ``http/1.1``.
|
||||||
ALPN is currently disabled.
|
ALPN is currently disabled.
|
||||||
|
|
||||||
* http://nghttp2.org/ (Upgrade / Direct)
|
* http://nghttp2.org/ (Upgrade / Direct)
|
||||||
|
|
||||||
``h2c-12`` and ``http/1.1``. We configured this server to send
|
``h2c-13`` and ``http/1.1``. We configured this server to send
|
||||||
ALTSVC frame or Alt-Svc header field to announce that alternative
|
ALTSVC frame or Alt-Svc header field to announce that alternative
|
||||||
service is available at port 443.
|
service is available at port 443.
|
||||||
|
|
||||||
|
@ -179,10 +179,10 @@ output from ``nghttp`` client::
|
||||||
|
|
||||||
$ src/nghttp -nv https://nghttp2.org
|
$ src/nghttp -nv https://nghttp2.org
|
||||||
[ 0.033][NPN] server offers:
|
[ 0.033][NPN] server offers:
|
||||||
* h2-lc
|
* h2-13
|
||||||
* spdy/3.1
|
* spdy/3.1
|
||||||
* http/1.1
|
* http/1.1
|
||||||
The negotiated protocol: h2-lc
|
The negotiated protocol: h2-13
|
||||||
[ 0.068] send SETTINGS frame <length=15, flags=0x00, stream_id=0>
|
[ 0.068] send SETTINGS frame <length=15, flags=0x00, stream_id=0>
|
||||||
(niv=3)
|
(niv=3)
|
||||||
[SETTINGS_MAX_CONCURRENT_STREAMS(3):100]
|
[SETTINGS_MAX_CONCURRENT_STREAMS(3):100]
|
||||||
|
@ -251,7 +251,7 @@ The HTTP Upgrade is performed like this::
|
||||||
GET / HTTP/1.1
|
GET / HTTP/1.1
|
||||||
Host: nghttp2.org
|
Host: nghttp2.org
|
||||||
Connection: Upgrade, HTTP2-Settings
|
Connection: Upgrade, HTTP2-Settings
|
||||||
Upgrade: h2c-lc
|
Upgrade: h2c-13
|
||||||
HTTP2-Settings: AwAAAGQEAAD__wUAAAAB
|
HTTP2-Settings: AwAAAGQEAAD__wUAAAAB
|
||||||
Accept: */*
|
Accept: */*
|
||||||
User-Agent: nghttp2/0.4.0-DEV
|
User-Agent: nghttp2/0.4.0-DEV
|
||||||
|
@ -260,7 +260,7 @@ The HTTP Upgrade is performed like this::
|
||||||
[ 0.024] HTTP Upgrade response
|
[ 0.024] HTTP Upgrade response
|
||||||
HTTP/1.1 101 Switching Protocols
|
HTTP/1.1 101 Switching Protocols
|
||||||
Connection: Upgrade
|
Connection: Upgrade
|
||||||
Upgrade: h2c-lc
|
Upgrade: h2c-13
|
||||||
|
|
||||||
|
|
||||||
[ 0.024] HTTP Upgrade success
|
[ 0.024] HTTP Upgrade success
|
||||||
|
@ -274,7 +274,7 @@ The HTTP Upgrade is performed like this::
|
||||||
[SETTINGS_MAX_CONCURRENT_STREAMS(3):100]
|
[SETTINGS_MAX_CONCURRENT_STREAMS(3):100]
|
||||||
[SETTINGS_INITIAL_WINDOW_SIZE(4):65535]
|
[SETTINGS_INITIAL_WINDOW_SIZE(4):65535]
|
||||||
[ 0.024] recv ALTSVC frame <length=43, flags=0x00, stream_id=0>
|
[ 0.024] recv ALTSVC frame <length=43, flags=0x00, stream_id=0>
|
||||||
(max-age=86400, port=443, protocol_id=h2-lc, host=nghttp2.org, origin=http://nghttp2.org)
|
(max-age=86400, port=443, protocol_id=h2-13, host=nghttp2.org, origin=http://nghttp2.org)
|
||||||
[ 0.024] send SETTINGS frame <length=0, flags=0x01, stream_id=0>
|
[ 0.024] send SETTINGS frame <length=0, flags=0x01, stream_id=0>
|
||||||
; ACK
|
; ACK
|
||||||
(niv=0)
|
(niv=0)
|
||||||
|
@ -382,7 +382,7 @@ information. Here is sample output from ``nghttpd`` server::
|
||||||
nghttpx - proxy
|
nghttpx - proxy
|
||||||
+++++++++++++++
|
+++++++++++++++
|
||||||
|
|
||||||
``nghttpx`` is a multi-threaded reverse proxy for ``h2-lc``, SPDY and
|
``nghttpx`` is a multi-threaded reverse proxy for ``h2-13``, SPDY and
|
||||||
HTTP/1.1 and powers nghttp2.org site. It has several operation modes:
|
HTTP/1.1 and powers nghttp2.org site. It has several operation modes:
|
||||||
|
|
||||||
================== ============================ ============== =============
|
================== ============================ ============== =============
|
||||||
|
@ -396,7 +396,7 @@ default mode HTTP/2, SPDY, HTTP/1.1 (TLS) HTTP/1.1 Reverse proxy
|
||||||
================== ============================ ============== =============
|
================== ============================ ============== =============
|
||||||
|
|
||||||
The interesting mode at the moment is the default mode. It works like
|
The interesting mode at the moment is the default mode. It works like
|
||||||
a reverse proxy and listens for ``h2-lc``, SPDY and HTTP/1.1 and can
|
a reverse proxy and listens for ``h2-13``, SPDY and HTTP/1.1 and can
|
||||||
be deployed SSL/TLS terminator for existing web server.
|
be deployed SSL/TLS terminator for existing web server.
|
||||||
|
|
||||||
The default mode, ``--http2-proxy`` and ``--http2-bridge`` modes use
|
The default mode, ``--http2-proxy`` and ``--http2-bridge`` modes use
|
||||||
|
|
|
@ -41,7 +41,7 @@ extern "C" {
|
||||||
* The protocol version identification string of this library
|
* The protocol version identification string of this library
|
||||||
* supports. This identifier is used if HTTP/2 is used over TLS.
|
* supports. This identifier is used if HTTP/2 is used over TLS.
|
||||||
*/
|
*/
|
||||||
#define NGHTTP2_PROTO_VERSION_ID "h2-lc"
|
#define NGHTTP2_PROTO_VERSION_ID "h2-13"
|
||||||
/**
|
/**
|
||||||
* @macro
|
* @macro
|
||||||
*
|
*
|
||||||
|
@ -56,7 +56,7 @@ extern "C" {
|
||||||
* supports. This identifier is used if HTTP/2 is used over cleartext
|
* supports. This identifier is used if HTTP/2 is used over cleartext
|
||||||
* TCP.
|
* TCP.
|
||||||
*/
|
*/
|
||||||
#define NGHTTP2_CLEARTEXT_PROTO_VERSION_ID "h2c-lc"
|
#define NGHTTP2_CLEARTEXT_PROTO_VERSION_ID "h2c-13"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @macro
|
* @macro
|
||||||
|
|
|
@ -33,7 +33,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',
|
||||||
5, 'h', '2', '-', 'l', 'c',
|
5, 'h', '2', '-', '1', '3',
|
||||||
6, 's', 'p', 'd', 'y', '/', '3'
|
6, 's', 'p', 'd', 'y', '/', '3'
|
||||||
};
|
};
|
||||||
unsigned char outlen;
|
unsigned char outlen;
|
||||||
|
|
Loading…
Reference in New Issue