curl / Mailing Lists / curl-library / Single Mail



From: Michael via curl-library <>
Date: Tue, 21 Mar 2017 07:31:27 +0000 (UTC)

    CURLcode code2(CURLE_FAILED_INIT);
    CURL* curl2 = curl_easy_init();

            /* enable uploading */
            curl_easy_setopt(curl2, CURLOPT_UPLOAD, 1L);

            curl_easy_setopt(curl2,CURLOPT_USERPWD, "u15-aha:ahaaha");
            curl_easy_setopt(curl2, CURLOPT_URL,"");

            /* Now run off and do what you've been told! */
            code2 = curl_easy_perform(curl2);
            /* Check for errors */
            if(code2 != CURLE_OK)
              fprintf(stderr, "curl_easy_perform() failed: %s\n",
Hi Ray
in the username I need to have a -Even with this simple name/password it fails. Curl is default from Ubuntu but I've compiled
a static lib last month and I don't remember what version that was. Anyway on Windows I use the latest
curl and I get the same error.Something weird to do with - ?Thanks and regards

      From: Ray Satiro via curl-library <>
Cc: Ray Satiro <>
 Sent: Tuesday, March 21, 2017 12:13 AM
 On 3/20/2017 12:37 PM, Michael via curl-library wrote:
I can ftp connect in terminal but with curl/c++ I get:
 error the line alike:
 curl_easy_setopt(curl2, CURLOPT_URL,"");
 I've tried all kind of stuff. Many thanks for help.
 There doesn't seem to be anything wrong with that URL. I suspect something in your actual URL is causing this problem. Likely there is some character that needs to be encoded and isn't. Also see
 Please reply with a sample URL we can use to reproduce and your curl_version() information, printf("%s\n", curl_version());


Received on 2017-03-21