cURL / Mailing Lists / curl-library / Single Mail


Re: HTTP2 and SPDY

From: Fabian Frank <>
Date: Thu, 30 Jan 2014 01:48:15 -0800

On Jan 28, 2014, at 2:24 PM, Daniel Stenberg <> wrote:

> If you really want to help out with http2, then an obvious area would be to work on ALPN and making sure that we start offering http2 for https:// URLs. We don't have anything of that in place yet.

Attached are 2 patches, one that is (IMHO) cleaner and provides NPN for openssl. This allows successful NPN with as well as Tatsuhiroís public test server. (Thanks for providing this server Tatsuhiro!). There was some initial confusion with NPN vs ALPN on my end. I think for now NPN is fine, as it gives us the ability to speak with other hosts, i.e. Twitter, and we can ALPN as preferred method on top. Also people that want to play/hack with HTTP/2.0 can do so without compiling their own OpenSSL. Iím planning to add ALPN later this week. You will see the following in curl -v output for NPN:
* SSLv3, TLS handshake, Server hello (2):
* NPN, negotiated HTTP2
* SSLv3, TLS handshake, CERT (11):

The second patch starts to do the check in http.c if NPN/ALPN negotiated HTTP/2.0 and if so it starts to initialize nghttp2 and send a request. The function to send the actual request is not yet done. I also moved the nghttp2 initialization in its own method, since not only the HTTP/1.1 to HTTP/2.0 upgrade code will need to do the init. I plan to hook up the actual code in send request later this week, but for now it doesnít send a request and thus it runs into for now
* recv_callback() was called with length 16384
* Failed receiving HTTP2 data
* nghttp2_session_recv() returned -902

List admin:
Received on 2014-01-30