curl / Mailing Lists / curl-library / Single Mail


Re: Built curl with nghttp2, attempts at HTTP2 return unsupported protocol

From: Ray Satiro via curl-library <>
Date: Mon, 27 Mar 2017 12:44:48 -0400

On 3/27/2017 10:39 AM, Reese Grimsley wrote:
> I built curl/libcurl with nghttp2 (at least I believe I did), and when
> I
> it returns the error for unsupported protocol. Is there a way that I
> can check to see if nghttp2 was actually built correctly into my
> libcurl? I ran make test after the initial make, and only about 6
> tests failed. I am positive that the configure file was set to enable
> nghttp2, but if it is possible to build libcurl with an invalid
> nghttp2 build, then that could also be the problem. Thanks.

If you're linking to libcurl as a shared object (eg DLL in Windows) it's
possible that a different libcurl is being loaded instead of the one you
expect. Use curl_version() to see the libraries it's using,
printf("%s\n", curl_version());

You can also do it programmatically

  if(!(curl_version_info(CURLVERSION_NOW)->features & CURL_VERSION_HTTP2)) {
    /* problem */

Received on 2017-03-27