cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: curl 6.5.2 -K - strangeness

From: Rich Gray <Rich.Gray_at_PlusTechnologies.com>
Date: Tue, 30 May 2000 10:17:08 -0400

> -----Original Message-----
> From: Daniel Stenberg [mailto:Daniel.Stenberg_at_haxx.nu]
> Sent: Monday, May 29, 2000 7:46 AM
> To: curl_at_contactor.se
> Subject: Re: curl 6.5.2 -K - strangeness
>
>
> On Fri, 26 May 2000, Rich Gray wrote:
>
> > Soooo, my question is, does/should -K have limitations?
>
> I think this proves that it behaves wrong.
>
> It should be corrected. I feel a bit bad because of that
> parser.

No need to feel bad, curl is neat, warts & all!

>I think that
> most options that takes an additional parameter want a
> separating newline
> after that parameter for the parser to do really good.
>
> That was mostly because I didn't add any decent
> quote-awareness, but to
> enable spaces it reads the parameter until end of line. My
> laziness is to
> blame.
>
> I would appriciate fixes to that parser.
>

Don't know when I would have a chance to understand and fix the parser, but
you have said enough to point the way to a work-around, just put newlines as
separators between arguments so that they are one per "line":

echo "-u root:secret -T /etc/hosts ftp://aix//tmp/junk" | curl -K -

fails

echo "-u root:secret\n -T /etc/hosts\n ftp://aix//tmp/junk" | curl -K -

Works! :-)
And this allows me to hide things I wish hidden in my programatic interface.

THANKS!
Rich

> --
> Daniel Stenberg - http://daniel.haxx.nu - +46-705-44 31 77
> ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol
>
Received on 2000-05-30