nghttp2/README.rst

83 lines
3.1 KiB
ReStructuredText
Raw Normal View History

2013-07-12 17:19:03 +02:00
nghttp2 - HTTP/2.0 C Library
============================
2012-01-26 17:38:35 +01:00
2013-07-12 17:19:03 +02:00
This is an experimental implementation of Hypertext Transfer Protocol
version 2.0.
2012-09-12 15:37:05 +02:00
2012-04-25 14:25:51 +02:00
Development Status
------------------
2012-03-26 16:46:02 +02:00
2013-07-16 17:08:05 +02:00
We started to implement HTTP-defat-04/2.0
(http://tools.ietf.org/html/draft-ietf-httpbis-http2-04) based on
spdylay code base.
2013-07-12 17:19:03 +02:00
2013-07-16 17:08:05 +02:00
The following features are not implemented:
2013-07-19 18:34:40 +02:00
* Header continuation
2013-07-22 16:31:32 +02:00
* ALPN: ``nghttp`` client and ``nghttpd`` server use OpenSSL without ALPN
support and still use NPN to negotiate ``HTTP-draft-04/2.0``.
* HTTP Upgrade dance
2013-07-16 17:08:05 +02:00
2013-07-19 18:34:40 +02:00
With those missing parts, the library is not still inter-operable
2013-07-16 17:08:05 +02:00
right now.
2013-07-22 16:31:32 +02:00
The ``nghttp`` client and ``nghttpd`` server are working now assuming
the above limitation. Both programs start HTTP/2.0 with `prior
knowledge
<http://tools.ietf.org/html/draft-ietf-httpbis-http2-04#section-3.4>`_
or TLS NPN negotiation. No HTTP upgrade dance is supported yet. You
can see the HTTP/2.0 frames back and forth and connection-level and
stream level flow controls.
2013-07-19 19:05:07 +02:00
2013-07-22 16:31:32 +02:00
Here is sample output from ``nghttp`` client::
2013-07-19 19:05:07 +02:00
2013-07-22 16:31:32 +02:00
$ src/nghttp https://localhost:3000/COPYING http://localhost:3000/AUTHORS -nv --no-tls
2013-07-19 19:05:07 +02:00
[ 0.000] Handshake complete
[ 0.000] recv SETTINGS frame <length=8, flags=0, stream_id=0>
(niv=1)
[4:100]
[ 0.000] send HEADERS frame <length=72, flags=5, stream_id=1>
; END_STREAM | END_HEADERS
; Open new stream
:host: localhost:3000
:method: GET
:path: /COPYING
:scheme: https
accept: */*
accept-encoding: gzip, deflate
user-agent: nghttp2/0.1.0-DEV
[ 0.000] send HEADERS frame <length=14, flags=5, stream_id=3>
; END_STREAM | END_HEADERS
; Open new stream
:host: localhost:3000
:method: GET
:path: /AUTHORS
:scheme: http
accept: */*
accept-encoding: gzip, deflate
user-agent: nghttp2/0.1.0-DEV
[ 0.001] recv HEADERS frame <length=121, flags=4, stream_id=1>
; END_HEADERS
; First response header
:status: 200 OK
cache-control: max-age=3600
content-length: 1080
date: Fri, 19 Jul 2013 17:02:21 GMT
last-modified: Fri, 12 Jul 2013 14:55:22 GMT
2013-07-22 16:31:32 +02:00
server: nghttpd nghttp2/0.1.0-DEV
2013-07-19 19:05:07 +02:00
[ 0.001] recv DATA frame (length=1080, flags=0, stream_id=1)
[ 0.001] recv DATA frame (length=0, flags=1, stream_id=1)
[ 0.001] recv HEADERS frame <length=6, flags=4, stream_id=3>
; END_HEADERS
; First response header
:status: 200 OK
cache-control: max-age=3600
content-length: 66
date: Fri, 19 Jul 2013 17:02:21 GMT
last-modified: Fri, 12 Jul 2013 14:55:22 GMT
2013-07-22 16:31:32 +02:00
server: nghttpd nghttp2/0.1.0-DEV
2013-07-19 19:05:07 +02:00
[ 0.001] recv DATA frame (length=66, flags=0, stream_id=3)
[ 0.001] recv DATA frame (length=0, flags=1, stream_id=3)
[ 0.001] send GOAWAY frame <length=8, flags=0, stream_id=0>
(last_stream_id=0, error_code=NO_ERROR(0), opaque_data=)