From 1c4df1832b179802052b9785001381855e03981c Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Tue, 28 Apr 2015 23:05:00 +0900 Subject: [PATCH] Update doc, mainly for RFC numbers --- README.rst | 10 +++------ lib/includes/nghttp2/nghttp2.h | 28 ++++++++++++------------- src/shrpx_client_handler.cc | 2 -- src/shrpx_http_downstream_connection.cc | 2 +- 4 files changed, 17 insertions(+), 25 deletions(-) diff --git a/README.rst b/README.rst index 4d45fff5..7ff2dde1 100644 --- a/README.rst +++ b/README.rst @@ -19,13 +19,9 @@ code coverage yet. Development Status ------------------ -We have implemented final HTTP/2 protocol specification. The RFC is -not published yet, so we use draft-17 specification for HTTP/2 -(http://tools.ietf.org/html/draft-ietf-httpbis-http2-14), and draft-11 -for header compression (aka HPACK) -(http://tools.ietf.org/html/draft-ietf-httpbis-header-compression-11). -These documents have been approved by IETF and no technical changes -are made before RFC publication. +We have implemented `RFC 7540 `_ +HTTP/2 and ``RFC 7541 `_ HPACK - +Header Compression for HTTP/2 The nghttp2 code base was forked from the spdylay (https://github.com/tatsuhiro-t/spdylay) project. diff --git a/lib/includes/nghttp2/nghttp2.h b/lib/includes/nghttp2/nghttp2.h index 4d6ad0ef..490f81fa 100644 --- a/lib/includes/nghttp2/nghttp2.h +++ b/lib/includes/nghttp2/nghttp2.h @@ -2001,10 +2001,10 @@ nghttp2_option_set_no_recv_client_magic(nghttp2_option *option, int val); * * By default, nghttp2 library enforces subset of HTTP Messaging rules * described in `HTTP/2 specification, section 8 - * `_. - * See :ref:`http-messaging` section for details. For those - * applications who use nghttp2 library as non-HTTP use, give nonzero - * to |val| to disable this enforcement. + * `_. See + * :ref:`http-messaging` section for details. For those applications + * who use nghttp2 library as non-HTTP use, give nonzero to |val| to + * disable this enforcement. */ NGHTTP2_EXTERN void nghttp2_option_set_no_http_messaging(nghttp2_option *option, int val); @@ -3452,14 +3452,14 @@ NGHTTP2_EXTERN int nghttp2_nv_compare_name(const nghttp2_nv *lhs, * A helper function for dealing with NPN in client side or ALPN in * server side. The |in| contains peer's protocol list in preferable * order. The format of |in| is length-prefixed and not - * null-terminated. For example, ``HTTP-draft-04/2.0`` and + * null-terminated. For example, ``h2`` and * ``http/1.1`` stored in |in| like this:: * - * in[0] = 17 - * in[1..17] = "HTTP-draft-04/2.0" - * in[18] = 8 - * in[19..26] = "http/1.1" - * inlen = 27 + * in[0] = 2 + * in[1..2] = "h2" + * in[3] = 8 + * in[4..11] = "http/1.1" + * inlen = 12 * * The selection algorithm is as follows: * @@ -3473,12 +3473,10 @@ NGHTTP2_EXTERN int nghttp2_nv_compare_name(const nghttp2_nv *lhs, * non-overlap case). In this case, |out| and |outlen| are left * untouched. * - * Selecting ``HTTP-draft-04/2.0`` means that ``HTTP-draft-04/2.0`` is - * written into |*out| and its length (which is 17) is assigned to - * |*outlen|. + * Selecting ``h2`` means that ``h2`` is written into |*out| and its + * length (which is 2) is assigned to |*outlen|. * - * For ALPN, refer to - * https://tools.ietf.org/html/draft-ietf-tls-applayerprotoneg-05 + * For ALPN, refer to https://tools.ietf.org/html/rfc7301 * * See http://technotes.googlecode.com/git/nextprotoneg.html for more * details about NPN. diff --git a/src/shrpx_client_handler.cc b/src/shrpx_client_handler.cc index 53f8ce82..886ac722 100644 --- a/src/shrpx_client_handler.cc +++ b/src/shrpx_client_handler.cc @@ -644,8 +644,6 @@ ConnectBlocker *ClientHandler::get_connect_blocker() const { void ClientHandler::direct_http2_upgrade() { upstream_ = make_unique(this); - // TODO We don't know exact h2 draft version in direct upgrade. We - // just use library default for now. alpn_ = NGHTTP2_CLEARTEXT_PROTO_VERSION_ID; on_read_ = &ClientHandler::upstream_read; } diff --git a/src/shrpx_http_downstream_connection.cc b/src/shrpx_http_downstream_connection.cc index 329fdce5..72ab410e 100644 --- a/src/shrpx_http_downstream_connection.cc +++ b/src/shrpx_http_downstream_connection.cc @@ -567,7 +567,7 @@ int htp_hdrs_completecb(http_parser *htp) { // Content-Length or Transfer-Encoding: chunked. Some server send // 304 status code with nonzero Content-Length, but without response // body. See - // http://tools.ietf.org/html/draft-ietf-httpbis-p1-messaging-20#section-3.3 + // https://tools.ietf.org/html/rfc7230#section-3.3 // TODO It seems that the cases other than HEAD are handled by // http-parser. Need test.