cURL / Mailing Lists / curl-users / Single Mail

curl-users

curl 6.5.2 -K - strangeness

From: Rich Gray <richNOgSPAM_at_PlusTechnologies.com>
Date: Fri, 26 May 2000 23:26:31 -0400

Hi curl folks!

To keep from exposing user id & passwords, I've been fooling with piping
the parameters to curl 6.5.2 running in a popened() pipe. In trying to
pass all transfer arguments down the pipe using -K -, I've noticed some
strange behavior. Curl seems to get confused if one tries to pipe more
than the -u stuff in. If one attempts to put the -T parm into the piped
arguments, it is ignored, and a retrieve is attempted against the url
instead of an upload. If one puts both the -T and url into the piped
arguments, both are ignored and curl complains:

5K>echo "-u root:secret -T /etc/hosts ftp://aix//tmp/junk" | curl -K -
curl: no URL specified!
curl: try 'curl --help' for more information
5K>

Even piped --help is strange:
                              
5K>echo " --help " | curl -K -
curl: no URL specified!
curl: try 'curl --help' for more information
5K>

I get the above if I hit [enter] right after the last "-", but if I add
a few spaces to the line, I get the help command display, THEN the above
error messages.

Soooo, my question is, does/should -K have limitations??? Or am I doing
Something Stupid(TM) ?? For my application (ftp puts), having the -T
and url on the curl command line may not be a problem, but I can forsee
instance where someone might want to setup a transfer and have no
particulars display on a ps command.

Regards,

Rich Gray

p.s. Should have some ports to report soon. Thanks to Danial for his
help!
Received on 2000-05-27