cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl FTP: CURLOPT_USERNAME and CURLOPT_PASSWORD not working in MAC OS X

From: Ravi Kishore Reddy G <ravikishoreg_at_gmail.com>
Date: Thu, 30 Apr 2009 11:56:16 +0530

Yes I am sure. I am using the same library on Windows and Mac.
If by any chance it is an older version I guess it should give
compiler errror when I use
CURLOPT_USERNAME and CURLOPT_PASSWORD. But it is compiling properly.

Thanks for the reply,
Ravi Kishore.

---------- Forwarded message ----------
From: Joe Nardone <jnardone_at_gmail.com>
To: libcurl development <curl-library_at_cool.haxx.se>
Date: Wed, 29 Apr 2009 10:24:03 -0400
Subject: Re: libcurl FTP: CURLOPT_USERNAME and CURLOPT_PASSWORD not
working in MAC OS X
> I tried on libcurl version 7.19.3
>
> The below code is working perfectly fine in Windows. The problem is
> only in Mac (I tried on 10.5.6).

>
> Instead of CURLOPT_USERNAME and CURLOPT_PASSWORD when I changed it to
> curl_easy_setopt(handle, CURLOPT_USERPWD, "username:password");
> it worked
>
> This also worked
> curl_easy_setopt(handle, CUROPT_URL, "ftp://username:password@.../abcd.txt");
>
>

Are you sure that the version of libcurl on the Mac is 7.19.3?
CURL_USERNAME and CURL_PASSWORD are relatively new options, and if you
have an older version then these won't work and you'll need to
upgrade. The results you're seeing imply that it's an older version.

joe
Received on 2009-04-30