Support for HTTP/2 protocol
- Status changed from New to Patch Pending
- Priority changed from Low to Normal
- Target version set to 1.4.56
- ASK QUESTIONS IN Forums set to No
I am nearly ready to post to my development branch some pre-alpha code with basic HTTP/2 support, and might be ready as early as this weekend.
Are there some volunteers who would be willing to build lighttpd from source (off of my development branch)?
Please be aware that HTTP/2 support in lighttpd entails a very large set of code changes, and there are quite possibly some critical bugs (crashing, memory leaks, etc) in this pre-alpha implementation of the HTTP/2 protocol in lighttpd. This is not intended for production use.
Caveats aside, my testing thus far performs nicely with h2load and passes h2spec tests
I did have to make an adjustment for h2spec tests to pass, and have filed some issues upstream for h2spec.
The pre-alpha HTTP/2 implementation has some limitations.
TODO: more testing
TODO: performance tuning
TODO: do something better than ignoring HTTP/2 PRIORITY (handled and discarded)
TODO: add additional debugging trace
TODO: mod_status modifications
future: enforce HTTP/2 requirements in TLS (or return INADEQUATE_SECURITY)
future: improve HTTP trailers support (maybe; low priority)
future: enhancements such as server-side PUSH_PROMISE (distant future; NOT IMPLEMENTED)
(If you do not want to receive email updates on this issue, please ask me to remove you from Watchers list on this issue, or you may do so yourself)
HTTP/2 development in lighttpd 1.4.x: discussion started in the lighttpd Development forum at: https://redmine.lighttpd.net/boards/3/topics/9339
Let's please keep discussion on the development forum, and I'll summarize status here in the issue ticket.
I have pushed my development branch
personal/gstrauss/master with support for HTTP/2.
Please refer to DevelGit for how to obtain the source code.
Please be aware that
personal/gstrauss/master is my development branch, and I often edit and rewrite the git history during development.
git pull --rebase to fetch changes, including the rewritten history.
HTTP/2 support in lighttpd (development) can be enabled in lighttpd.conf with:
server.feature-flags += ("server.h2proto" => "enable")
For now, server.h2proto is disabled by default.
In addition to the above,
Upgrade: h2c support can be enabled with
server.feature-flags += ("server.h2c" => "enable")
h2spec is a conformance testing tool for HTTP/2 implementation.
Running h2spec against lighttpd requires a target file (/index.html) at least 16k+1 bytes in size (16385) or else some of the tests (which expect multiple frames) do not pass.
(documenting some manual testing from August)
In the meantime,
lighttpd h2.c:h2_recv_headers() has a
#if 0 block that sends stream PROTOCOL_ERROR instead of 400 Bad Request, and enabling the block allows lighttpd to pass all h2spec tests except for the generic/5 HPACK test (for HTTPS), and for the generic/5 HPACK test and http2/3.5 HTTP/2 Connection Preface test (for HTTP). lighttpd behavior conforms to the RFCs; these test failures
are false positives. See the links above for suggested fixes to h2spec.
h2spec -P /index.html -p 8443 -S -k -t
h2spec -P /index.html -p 8080 -S
Also available in: Atom