We released nghttp2 v0.7.7.
This is basically the same as v0.7.6. We missed updating man pages in v0.7.6 release, so v0.7.7.
We released nghttp2 v0.7.6.
This release made several enhancements to the library. First we made
sending trailer part (trailer header field) easier. Previously,
nghttp2_submit_request() and nghttp2_submit_response() sets
END_STREAM flag set for the last DATA frame and we have no way to
send trailer part. To fix this issue, we added
NGHTTP2_DATA_FLAG_NO_END_STREAM flag. If application sets this flag
along side with NGHTTP2_DATA_FLAG_EOF in
nghttp2_data_source_read_callback, the library does not set
END_STREAM flag. Then the application can use new
nghttp2_submit_trailer() function to send trailer part, which is
a HEADERS frame with END_STREAM flag set. The all bundled
applications and libnghttp2_asio utilize this feature to send trailer
part.
Second enhancement is that now library refuses PUSH_PROMISE frame if
unacked local SETTINGS includes ENABLE_PUSH == 0 (disabling server
push). Previously the library refuses PUSH_PROMISE only after
SETTINGS are acked.
nghttpx has several enhancements in this release. It now accepts
multiple backend server addresses for HTTP/2 backend. Previously the
number of HTTP/2 backend server is limited to 1 per worker. In this
release, we added --backend-http2-connections-per-worker option to
specify the number of HTTP/2 backend connection per worker. As the
library gets enhanced support for trailer part, nghttpx now supports
trailer part for both HTTP/2 and HTTP/1. That means nghttpx can proxy
gRPC traffic, which requires trailer support.
we also fixed the bug that server push is broken after HTTP upgrade.
The another bug, which crashes nghttpx when upgrading HTTP/2 failed,
was also fixed.
Stefan Eissing wrote a patch to nghttpx to replace C++11
thread_local keyword with traditional pthread functions. Since Mac
OS X’s xcode toolchain does not support thread_local, it may be
possible to use nghttpx in multi-threaded mode on Mac OS X finally.
For nghttpd and nghttp, we added --trailer option to send trailer
part to exercise trailer part functionality.
For nghttp, Kazuho Oku kindly sent us a patch not to send pseudo-headers in HTTP Upgrade request (which itself is HTTP/1.1 message).
nghttp now treats request as success only if it sees the END_STREAM from peer. Previously it treated a request as success if it is closed (with/without error), before connection close.
We fixed nghttpd bug that “date” header field value is not updated.
For python binding, we fixed bug that push response header fields are not passed to callback in client library.
We rewrite libnghttp2_asio library and its API is not compatible to the earlier versions. Also we added client API. See libnghttp2_asio documentation about the example use of these APIs.
We released nghttp2 v0.7.5. This release still uses h2-14 identifier in library code, but h2-14 through to final draft version is binary compatible and nghttp2 supports all features in the latest draft.
In this release, we implemented validation against HTTP Messaging
semantics described in
HTTP/2 draft, section 8..
We do not perform all the checks described in that section, but this
time we implemented basic and fundamental checks which makes
application code much cleaner. This validation pretty much restricts nghttp2 library to HTTP/2 use only. For those applications to use nghttp2 as non-http use case, use nghttp2_option_set_no_http_messaging() to disable this feature.
For more detailed information about this subject, see the manual.
Previously, in verbose output of nghttp, nghttpd and nghttpx, we show “noind=1” if header field is encoded in HPACK Never Indexed representation. Now it is shown as “sensitive” to make its meaning more clearer. Other implementations use the same wording.
nghttpd got new option -a, --address=<ADDR> that allows nghttpd to
bind to a non-default address. This feature was contributed by Brian
Card.
In the previous release, we updated nghttp --stat option. Now we
make its terminology and processing model to match those in
Resource Timing TR.
Let’s talk about nghttpx proxy server. It now supports UNIX domain socket for both frontend and backend. We omitted minor version in Via header field and access logging if HTTP version is HTTP/2. We fixed the bug that nghttpx crashes if it receives more bytes than Content-Length from HTTP/1 backend.
We fixed asio-sv2 so that it compiles under OS X.
And finally as we know HTTP/2 specification was approved by IETF, we now announce h2 ALPN ID in nghttp, nghttpd, nghttpx and h2load!
For future release plan, we continue to develop nghttp2 in 0.7 series until HTTP/2 RFC is published. After RFC publication we’ll finally release version 1.0.0.
We released nghttp2 v0.7.4. This release still uses h2-14 identifier in library code.
In this release, we fixed few corner case bugs in the library code.
We rewrite nghttp’s --stat option output completely. It now shows
the timings of request and completion of each resources:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | |
The list is sorted by complete time, that is time point its stream
was closed. Notice that request field of /stylesheets/screen.css
has *, which means that it was pushed by server.
nghttpd has a bug that multiple -p option won’t work, but it is
not fixed.
As we wrote in nghttp2.org enabled HTTP/2 server push, nghttpx gets
HTTP/2 server push support by inspecting
Link header field from backend
server. nghttpx now rewrites Host and :authority header fields when
forwarding to backend server by default. --no-host-rewrite option
to disable it.
h2load now shows time for request min, max, mean and standard deviation:
1 2 3 4 5 6 | |
To make command-line operation easier, we added bash_completion files for nghttp, nghttpd, nghttpx and h2load. They reside in doc/bash_completion directory.
We implemented HTTP/2 server push in nghttpx and we enabled server push in nghttp2.org site.
When you access https://nghttp2.org via HTTP/2 protocol, CSS file /stylesheets/screen.css is pushed to client. If you inspect the response header closely, you will find Link header field like this:
1
| |
We operate nghttp2.org site using nghttpx proxy server in front and nginx on its back. The Link header field above is generated by nginx. When nghttpx proxy sees this in response header, it initiates server push for resource denoted by path enclosed by ‘<’ and ‘>’. We specifically check link relation preload to decide the resource should be pushed or not. See the manual page to enable this feature in nghttpx.
We also push different resources, CSS and font files, under https://nghttp2.org/documentation/
We released nghttp2 v0.7.3. v0.7.2 was replaced with v0.7.3 shortly after its release because it contains apparent bugs. The v0.7.3 release still uses h2-14 identifier in library code.
Since v0.7.3 is quick bug fix release, we summarize changes made in
both v0.7.3 and v0.7.2. We added nghttp2_submit_shutdown_notice()
API function. It is intended to be used by server and tells client
that server has started graceful shutdown by sending GOAWAY with (1 <<
31) - 1 as last-stream-ID. We also added
nghttp2_session_get_last_proc_stream_id(), which returns the largest
stream ID the library called nghttp2_on_frame_recv_callback() for
and can be passed as last-stream-id paramter to
nghttp2_submit_goaway() if application has no more specific
knowledge about last-stream-ID.
nghttpx has several options added. They are mostly optimzation purpose. We tightened up HTTP header field validation in nghttpx, particularly for Content-Length header field.
To upgrade ease of use, options which take SIZE as metavar can use
units (K, M and G, powers of 1024) along with leading digits. For
example, now we can specify --read-rate=4K, which is identical to
--read-rate=4096.
Since nghttpx has many features, we started to add integration testing
framework using Go programming language and its go test feature. It
resides in integration-tests directory.
We just released nghttp2 v0.7.1. The library documentation is still based on h2-14. nghttp, nghttpd, nghttpx and h2load additionally advertise h2-16 ALPN token to interop with the implementations which require h2-16.
This release fixes GOAWAY handling to conform to the HTTP/2 specification. TLS read/write error in nghttp, nghttpd, nghttpx and h2load has been fixed. We enabled TLS session ticket with automatic key rotation in nghttpx. We also add an option to specify key parameter from file (but without automatic rotation) to nghttpx to share same keys with multiple instances. For documentation wise, man pages are now now generated using Sphinx. We don’t use help2man anymore.
We just released nghttp2 v0.7.0. The library documentation is still based on h2-14. nghttp, nghttpd, nghttpx and h2load additionally advertise h2-16 ALPN token to interop with the implementations which require h2-16.
We added some new APIs. The custom memory allocator nghttp2_mem was
introduced in this release. We have also added several initialization
fucntions to use this allocator. The new
nghttp2_session_set_next_stream_id() and
nghttp2_session_get_next_stream_id() functions have been added.
nghttp2_session_set_next_stream_id() sets next outgoing stream ID,
while nghttp2_session_get_next_stream_id() returns the next outgoing
stream ID. These fucntions are useful when streams are used as
anchors in dependency tree and leave them idle.
Now nghttp, nghttpd, nghttpx and h2load applications use libev instead of libevent. Libevent is still required to build source files under examples directory.
nghttp has supported the feature to reading files from stdin to upload
to a server for quite some time, but it only supported files and did
not work with non-file (e.g., echo -n "foo" | nghttp -d-
http://nghttp2.org/). Kazuho Oku contributed the patch to fix this
issue.
nghttp2 v0.6.7 has been released. We still advertises h2-14 support in ALPN, but we have merged h2-16 features in this release. They are binary compatible, so we use h2-14, which is the interop draft version.
For library code, there are several changes. Due to the change made
into h2-16, PRIORITY frame is now allowed in any state state. Also we
refined GOAWAY handling by utilizing last-stream-id extensively.
nghttp2_session_want_read() and nghttp2_session_want_write()
reflect this change so as to make graceful shutdown easier.
nghttpx got some enhancement. It now has the feature to configure access logging format. In addition to the usual combined log fields, we have added additional custom fields. Some of the new custom fields were contributed by Lucas Pardue. The cipher suite requirement in nghttpx was now removed and it only requires TLSv1.2 for HTTP/2 connection due to the changes in h2-16. nghttpx also disabled spdy/3 and spdy/2 by default, since they are now being deprecated world wide.
nghttp got some interesting options. The most notable option is -r.
If it is given with file name, nghttp saves HTTP transactions in
well-known HAR format. It is expected to be used with -a option.
h2load finally got ALPN support.
For python bindings, client implementation was contributed by Kyle Schomp.
nghttp command-line client has some useful options to test your HTTP/2 server implementation. This blog post introduces such command-line options.
We recommend to enable -nv options for nghttp to see what is
happening on HTTP/2 framing layer. It is very good source of
information for debugging.
To test whether server enfoces flow control window size advertised by
client, use -W and/or -w option. -W option specifies connection
level flow control window size. It specifies the number of bits
rather than the size directly, so if you specify -W14, the window
size becomes 16383 (= 2 ** 14 - 1). Similarly, -w option specifies
stream level flow control window size. Since HTTP/2 does not have
dedicated way to reduce connection level window size, we achieve this
by not sending WINDOW_UPDATE frame to server to keep the available
window size less than or equal to the specified size. Therefore, to
test connection window size less than default value which is 65535,
nghttp should request resource more than 65535 bytes, otherwise -W
has no effect. If nghttp found any errors related to flow control, it
emits FLOW_CONTROL_ERROR and exists nonzero.
HTTP/2 uses header compression technique called HPACK. We know that, by iterop experience, single request/response is not enough to test HPACK. The problem is more likely happening after several request/response transactions. This is because HPACK uses stateful compression mechanism and it requires both server and client share same compression context. If they are out of sync, problem appears. So testing HPACK must be done with multiple requests and responses. This means that it also exercises multiplexing.
For this purpose, -a option is handy. If -a is used, nghttp
parses downloaded HTML file and finds statically linked resources,
such as CSS, Javascript and images. Then it requests them which are
multiplexed in the same HTTP/2 session (same connection).
If nghttp client found an error while decoding header block, it emits COMPRESSION_ERROR and exists nonzero.
To upload the content of a file, use -d option. By default, nghttp
adds content-length header field when uploading data. Specifying
--no-content-length option will omit content-length header field
from request header.
-b option adds given number of bytes to HEADERS or DATA frame as
padding. This will verify that whether server can correctly parse
frames by taking into account the existence of padding bytes.
Using --continuation will send very large headers to server using
CONTINUATION frame. The total header block size (HEADERS +
CONTINUATION) is around 18K bytes.
Use -a option and see that how server reacts to priority hints given
from client. If -a is used, nghttp parses downloaded HTML file and
finds statically linked resources, such as CSS, Javascript and images.
Then it requests them which are multiplexed in the same HTTP/2 session
(same connection). By default, nghttp prioritizes resources as
follows:
Then it creates dependency tree and issues requests with this
dependency hints. To verify how server reacts to this hints, -r
option is very useful. It saves the HTTP transactions to given file
as HAR format. Then you can use
HAR file viewer to see
the load times. To compare the result without prority, issue the same
request with --no-dep option, which entirely omits priority hints.