cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: How to handle non-ASCII characters in URLs

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Fri, 9 Jan 2009 16:44:09 -0800

On Fri, Jan 09, 2009 at 11:40:38PM +0000, G. T. Stresen-Reuter wrote:
> An abbreviated sample of the command I'm using is:
>
> curl -s -u "user:pass" "ftp://domain.com/dir/" -Q "DELE /dir/espaņa.txt"
> -v
>
> I'm confused by how much of the path I have to include in the "ftp://"
> part and how much needs to be in the "DELE" part, and what the difference
> is between the two.

The -v option will show you when the various commands are sent in the
protocol session. You'll see that a regular -Q command is sent before the
CWD to change directories, while a -Q with a - prefix is sent after. So
if you use -DELE you don't need to specify the path name.

Note also that a URL of ftp://domain.com/dir/foo.txt corresponds to
-Q "DELE dir/foo.txt" not "DELE /dir/espaņa.txt" and are likely to refer to
different files. The latter corresponds to a URL of
ftp://domain.com//dir/foo.txt

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2009-01-10