curl-library
Re: HTTP2 and SPDY
Date: Sun, 26 Jan 2014 18:20:58 +0100 (CET)
On Sat, 25 Jan 2014, Fabian Frank wrote:
> It would be great if someone working on http2 (Daniel?) could share the
> current status, planned design - if there is one - and most importantly,
> where help and contribution is needed.
General http2 status:
Firefox has an implementation of http2 draft-09 and so does twitter. I
blogged about what's about to change in http2 from this point:
http://daniel.haxx.se/blog/2014/01/24/http2-the-next-step/
There's likely to be a draft-10 out within a few weeks and it will change the
protocol on the wire a bit again. I'm pretty sure both Firefox and Twitter
will adapt pretty swiftly and that help us with interop.
Source code status:
There's no HTTPS/http2 support at all yet. We need to ask for 'h2,http' using
ALPN as that's the negotiation mechanism chosen for http2 and OpenSSL has not
released ALPN support in a public release yet. I also decided to work on the
plain-text version of the protocol first to kind of start somewhere.
I have two patches pending (attached) that do the Upgrade dance a little bit
and start to use the nghttp2 API to actually "decode" the HTTP2 stream. The
binary "junk" seen right now is because libcurl simply downloads the TCP as-is
without caring about the HTTP2 protocol at all.
When I last worked on this code I found a problem with the nghttp2 API that
Tatsushiro has since adressed so we should be able to proceed better now. To
do next is basically to make sure we pipe incoming tcp data properly to
nghttp2 and take care of what nghttp2 decodes for us.
Most likely we need to make a http2=>http1 translation of incoming headers,
and then pass the headers through our existing http parser (at least for the
subset of headers that aren't related to message framing etc). It will also
give us the opportunity (optionally) to pass on http2 headers to applications
with the "old" look and possibly ease transition even more.
Next steps:
After the release on this coming Wednesday, I'll push my two pending http2
commits. Then we can work on making sure we decode the received data properly
and make sure that we can send http2 requests and uploads properly. We also
need to work on how to do ALPN properly which has an added complexity in the
fact that we have the "vtls" layer that abstracts a lot of SSL backends.
Finally:
I'm glad to see your interest to help out. I would love to see some progress
here so that we can join the small community of early http2 implementations
and hopefully try it out early and see how it works!
Questions or comments?
-- / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
- TEXT/X-DIFF attachment: 0001-http2-handle-101-responses-and-switch-to-HTTP2.patch
- TEXT/X-DIFF attachment: 0002-http2-switch-recv-send-functions-to-http2-ones-after.patch