curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Curl coredump after re-use connection

From: Nguyen Hoang Tuan \(Hubble Vietnam\) via curl-library <curl-library_at_cool.haxx.se>
Date: Tue, 17 Sep 2019 05:01:45 +0000

Hi there,

I am an newbie starting to use libcurl and trying to write an example to reuse http connection.
Everything is ok when i just re call curl_easy_perform many times without any change.
But when i try reuse connection from HTTP_POST to use in HTTP_GET, i got segmentation fault.
The server address is same, just endpoint is difference.

About the way I reuse connection, I just create a global variable 'curl', call easy init and passing it to post and get function.

Libcurl version: 7.47.0

correct flow:
1/ create connection by using HTTP_POST: https://server_address/endpoint1
2/ Reuse connection with HTTP_GET: https://server_address/endpoint2

I also got segmentation fault if i re-use the connection with difference server address.

So what I should do and should not do when try to re-use connection ?

Thanks

Tuan Nguyen

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2019-09-17