curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: CURLE_URL_MALFORMAT

From: Michael via curl-library <curl-library_at_cool.haxx.se>
Date: Tue, 21 Mar 2017 08:32:54 +0000 (UTC)

I've tried with the code below but still
CURLE_URL_MALFORMAT
  
ftp login works from terminal.So where could be the problem? I've asked the server stuff and they don't see any problem with their server.Thanks

      From: Daniel Stenberg <daniel_at_haxx.se>
 To: Michael <scrat_here_at_yahoo.com>; libcurl development <curl-library_at_cool.haxx.se>
 Sent: Tuesday, March 21, 2017 8:46 AM
 Subject: Re: CURLE_URL_MALFORMAT
   
On Tue, 21 Mar 2017, Michael via curl-library wrote:

> 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 - ?

I can't see any problem when trying this in my end. I tested the code below
and it works just fine. This ftp server has the good manner to accept any user
name and password so I can also verify that the one we set is actually sent
and used.

int main(int argc, char** argv)
{
  CURLcode code;
  CURL *curl = curl_easy_init();

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

  curl_easy_setopt(curl, CURLOPT_USERPWD, "u15-aha:ahaaha");
  curl_easy_setopt(curl, CURLOPT_URL,"ftp://ftp.funet.fi/");

  /* Now run off and do what you've been told! */
  code = curl_easy_perform(curl);

  curl_easy_cleanup(curl);
}

-- 
  / daniel.haxx.se
   

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