curl / Mailing Lists / curl-library / Single Mail

curl-library

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

From: Ray Satiro via curl-library <curl-library_at_cool.haxx.se>
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
> try curl_easy_setopt(curl,CURLOPT_HTTP_VERSION,CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE),
> 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 */
  }

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-03-27