curl-library
libcurl and http2
Date: Wed, 4 Sep 2013 10:30:06 +0200 (CEST)
Hi all,
I've pushed my initial in-preparation-for-http2 commits to git. More will
follow as I proceed.
My plan is to base the http2 work on the nghttp2 library
(https://github.com/tatsuhiro-t/nghttp2). HTTP2 over the wire is more
complicated that HTTP1.1 and that's why I think it makes sense to use a
library dedicated for this. nghttp2 is this library and I'm also working with
that project to help out as much as I can. I can only encourage interested
readers to join in and help as you see fit!
HTTP2 will start as a "feature" in libcurl terms and not specifically as a
separate protocol. URLs will remain http:// and https:// but there is a
mechanism to upgrade connections from HTTP1.1 to HTTP2 that libcurl will
support.
nghttp2 is not stable API wise and is not released in any fashion yet afaik
apart from git, so bumps along the road are to be expected.
libcurl API wise, you do a "HTTP2 request" by setting CURLOPT_HTTP_VERSION to
CURL_HTTP_VERSION_2_0 and libcurl will then attempt to use HTTP 2.0 or stick
at 1.1 if the server doesn't support 2.0. Later on, http2 will offer some
challenges internally for how to properly support multiple streams over the
same physical connection in a good fashion for the multi interface.
Testing wise, I intend to write up a test server (based on nghttp2 as well)
and use that to verify http2 functionality - at least once the basics seem to
get into place.
Spec-wise, http2 is in draft-06 and may very well change a lot going forward.
Or not. It is not near a final version but the basic paradigms seem to have
been agreed upon so I'm making a bet now that digging into this is worth it at
this point.
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2013-09-04