curl-library
Re: CURLE_URL_MALFORMAT
Date: Tue, 21 Mar 2017 07:31:27 +0000 (UTC)
CURLcode code2(CURLE_FAILED_INIT);
CURL* curl2 = curl_easy_init();
if(curl2)
{
/* enable uploading */
curl_easy_setopt(curl2, CURLOPT_UPLOAD, 1L);
curl_easy_setopt(curl2,CURLOPT_USERPWD, "u15-aha:ahaaha");
curl_easy_setopt(curl2, CURLOPT_URL,"ftp://example.com/");
/* 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",
curl_easy_strerror(code2));
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 <curl-library_at_cool.haxx.se>
To: curl-library_at_cool.haxx.se
Cc: Ray Satiro <raysatiro_at_yahoo.com>
Sent: Tuesday, March 21, 2017 12:13 AM
Subject: Re: CURLE_URL_MALFORMAT
On 3/20/2017 12:37 PM, Michael via curl-library wrote:
I can ftp connect in terminal but with curl/c++ I get:
CURLE_URL_MALFORMAT
error the line alike:
curl_easy_setopt(curl2, CURLOPT_URL,"ftp://u9-3tja:365@example.com/");
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 http://stackoverflow.com/a/33965113
Please reply with a sample URL we can use to reproduce and your curl_version() information, printf("%s\n", curl_version());
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-03-21