« Quarantine Properties… | Home | REAL Studio linker pr… »

CURL tip of the day

Normally we all put username and password in the URL for a download. It's simple and convenient. Like this:
"ftp://christian:123456@ftp.someserver.com/test/file.txt"
But what to do if the username or the password contains characters like "@" or ":"?

"ftp://christian@mbs:123456@ftp.someserver.com/test/file.txt"
this URL will fail to parse as CURL expects the server name after the first @.

The solution is to use the OptionUsername and OptionPassword properties for the name and password:
c.OptionUsername = "christian@mbs"
c.OptionPassword = "123456"
c.OptionURL = "ftp://ftp.someserver.com/test/file.txt"
I hope this helps you.
11 07 10 - 14:00