curl / Mailing Lists / curl-library / Single Mail



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

I've tried with the code below but still
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 <>
 To: Michael <>; libcurl development <>
 Sent: Tuesday, March 21, 2017 8:46 AM
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,"");

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



Received on 2017-03-21