cURL / Mailing Lists / curl-library / Single Mail

curl-library

At (@) in user or password

From: Andy Cedilnik <andy.cedilnik_at_kitware.com>
Date: 02 Apr 2003 09:07:43 -0500

Hi,

Simple question. I want to use:
::curl_easy_setopt(curl,CURLOPT_URL, someurl.c_str());

So I create someurl:

someurl = "ftp://"
someurl += username;
someurl += ":";
someurl += password;
someurl += "@"
someurl += hostname;
someurl += remotedir;

Now, when username or password contain @, the whole thing fails. Curl is
attempting to use <part of password>@hostname as the hostname.

So, do I escape @? Maybe something like %40?

                        Andy

-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
Received on 2003-04-02