Update doc, mainly for RFC numbers

This commit is contained in:
Tatsuhiro Tsujikawa 2015-04-28 23:05:00 +09:00
parent 1ad1fe6005
commit 1c4df1832b
4 changed files with 17 additions and 25 deletions

View File

@ -19,13 +19,9 @@ code coverage yet.
Development Status Development Status
------------------ ------------------
We have implemented final HTTP/2 protocol specification. The RFC is We have implemented `RFC 7540 <https://tools.ietf.org/html/rfc7540>`_
not published yet, so we use draft-17 specification for HTTP/2 HTTP/2 and ``RFC 7541 <https://tools.ietf.org/html/rfc7541>`_ HPACK -
(http://tools.ietf.org/html/draft-ietf-httpbis-http2-14), and draft-11 Header Compression for HTTP/2
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.
The nghttp2 code base was forked from the spdylay The nghttp2 code base was forked from the spdylay
(https://github.com/tatsuhiro-t/spdylay) project. (https://github.com/tatsuhiro-t/spdylay) project.

View File

@ -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 * By default, nghttp2 library enforces subset of HTTP Messaging rules
* described in `HTTP/2 specification, section 8 * described in `HTTP/2 specification, section 8
* <https://tools.ietf.org/html/draft-ietf-httpbis-http2-17#section-8>`_. * <https://tools.ietf.org/html/rfc7540#section-8>`_. See
* See :ref:`http-messaging` section for details. For those * :ref:`http-messaging` section for details. For those applications
* applications who use nghttp2 library as non-HTTP use, give nonzero * who use nghttp2 library as non-HTTP use, give nonzero to |val| to
* to |val| to disable this enforcement. * disable this enforcement.
*/ */
NGHTTP2_EXTERN void nghttp2_option_set_no_http_messaging(nghttp2_option *option, NGHTTP2_EXTERN void nghttp2_option_set_no_http_messaging(nghttp2_option *option,
int val); 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 * A helper function for dealing with NPN in client side or ALPN in
* server side. The |in| contains peer's protocol list in preferable * server side. The |in| contains peer's protocol list in preferable
* order. The format of |in| is length-prefixed and not * 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:: * ``http/1.1`` stored in |in| like this::
* *
* in[0] = 17 * in[0] = 2
* in[1..17] = "HTTP-draft-04/2.0" * in[1..2] = "h2"
* in[18] = 8 * in[3] = 8
* in[19..26] = "http/1.1" * in[4..11] = "http/1.1"
* inlen = 27 * inlen = 12
* *
* The selection algorithm is as follows: * 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 * non-overlap case). In this case, |out| and |outlen| are left
* untouched. * untouched.
* *
* Selecting ``HTTP-draft-04/2.0`` means that ``HTTP-draft-04/2.0`` is * Selecting ``h2`` means that ``h2`` is written into |*out| and its
* written into |*out| and its length (which is 17) is assigned to * length (which is 2) is assigned to |*outlen|.
* |*outlen|.
* *
* For ALPN, refer to * For ALPN, refer to https://tools.ietf.org/html/rfc7301
* https://tools.ietf.org/html/draft-ietf-tls-applayerprotoneg-05
* *
* See http://technotes.googlecode.com/git/nextprotoneg.html for more * See http://technotes.googlecode.com/git/nextprotoneg.html for more
* details about NPN. * details about NPN.

View File

@ -644,8 +644,6 @@ ConnectBlocker *ClientHandler::get_connect_blocker() const {
void ClientHandler::direct_http2_upgrade() { void ClientHandler::direct_http2_upgrade() {
upstream_ = make_unique<Http2Upstream>(this); upstream_ = make_unique<Http2Upstream>(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; alpn_ = NGHTTP2_CLEARTEXT_PROTO_VERSION_ID;
on_read_ = &ClientHandler::upstream_read; on_read_ = &ClientHandler::upstream_read;
} }

View File

@ -567,7 +567,7 @@ int htp_hdrs_completecb(http_parser *htp) {
// Content-Length or Transfer-Encoding: chunked. Some server send // Content-Length or Transfer-Encoding: chunked. Some server send
// 304 status code with nonzero Content-Length, but without response // 304 status code with nonzero Content-Length, but without response
// body. See // 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 // TODO It seems that the cases other than HEAD are handled by
// http-parser. Need test. // http-parser. Need test.