Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception after setting CURLOPT_HTTP_VERSION to CURL_HTTP_VERSION_2_0 #84

Closed
osanwe opened this issue Jun 13, 2016 · 4 comments
Closed

Comments

@osanwe
Copy link

osanwe commented Jun 13, 2016

Hello!

I tried to built the first example, and it works well. Next I tried to add http2 support to it:

easy.add<CURLOPT_HTTP_VERSION>(3);

and after that I got the follow error:

terminate called after throwing an instance of 'curl::curl_easy_exception'
  what():  std::exception
Aborted (core dumped)
~> curl -V
curl 7.49.0 (x86_64-pc-linux-gnu) libcurl/7.49.0 OpenSSL/1.0.2h zlib/1.2.8
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp 
Features: IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP UnixSockets
@JosephP91
Copy link
Owner

JosephP91 commented Jun 13, 2016

Hi @osanwe
Well, I noticed that, if you put

easy.add<CURLOPT_HTTP_VERSION>(3);

inside a try-catch block, the error is: Unsupported protocol.
P.s.: you can use CURL_HTTP_VERSION_2_0 (or CURL_HTTP_VERSION_2), if you want, instead of 3.

@osanwe
Copy link
Author

osanwe commented Jun 13, 2016

@JosephP91
Well, thanks!
Is there a way to use http2 without rebuilding libcurl? Unfortunately Mer SDK hasn't cURL with http2.

@JosephP91
Copy link
Owner

I really don't know, but you could try asking this question in the libcurl mailing list or contacting libcurl creator. Let me know!

@JosephP91
Copy link
Owner

Since this is not a bug of curlcpp library, I will close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants