cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Cookies still not working as of 7.9.1-pre2

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 8 Oct 2001 13:38:09 +0200 (MET DST)

On Fri, 5 Oct 2001, SM wrote:

> I made a mistake while testing. I ran:
>
> curl -b -c "cookie.txt" http://server/index.html
>
> and I got:
>
> curl: (6) Couldn't resolve host 'cookie.txt'
>
> followed by the webpage output. The cookie was not saved to the
> cookie.txt file. BTW, I know that there should be an argument after the
> "-b". :) It looks like a bug in the parameter parsing.

I can't see the bug in this. -b takes an argument, so in this case it got
"-c" as a filename to read cookies from. The rest of the command line was
treated as two URLs, of which the first one couldn't resolve and thus caused
the error output.

The only way I can think of we could've trapped this, would be to somehow not
allow file names that start with a dash ('-'). I wouldn't like that.

We could also require strict URL syntax, which then would've caused the
"cookies.txt" to not pass the test, but I wouldn't want that either...

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2001-10-08