cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Curl options Ordering Issue?

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Mon, 21 Jul 2008 11:53:26 -0700

On Mon, Jul 21, 2008 at 11:41:28AM -0700, John Ouellette wrote:
> Hi all,
>
> I have been testing curl and its interactions with web pages.
>
> I have created a small shell script that interacts with a banking website that
> uses cookies and (302) redirects.
>
>
> In my testing I found some odd behavior.
>
> If I use the following options in the command line, curl could log in to the
> website just fine.
> curl -d "POSTDATA" "URL" -L -b -i -o output --trace-ascii trace-ascii.txt -D
> dump-header.txt
>
> If I use the following command line options in this order it fails to login to
> the website.
> curl -d "POSTDATA" "URL" -b -L -i -o output --trace-ascii trace-ascii.txt -D
> dump-header.txt
>
> Notice only -b -L are switched. The behavior is repeatable.
>
> The curl man page doesn't mention anything regarding the order of options.

But it does say that -b takes an argument which is a file name. The second
command line reads cookies from a file called "-L" which means that curl
will not follow redirects (since the -L option is not given).

>>> 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 2008-07-21