cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Curl options Ordering Issue?

From: John Ouellette <john_ouellette_at_yahoo.com>
Date: Mon, 21 Jul 2008 16:53:24 -0700 (PDT)

Hi Dan

Thanks for the response. I think you nailed it!

I should mention that I am not trying to have curl read from the file, just use already set cookies it picked up along the way. So from what I can see I need to at least set a "dummy" file to satisfy curl and to  activate the "cookie parser".

-John

--- On Mon, 7/21/08, Dan Fandrich <dan_at_coneharvesters.com> wrote:
From: Dan Fandrich <dan_at_coneharvesters.com>
Subject: Re: Curl options Ordering Issue?
To: curl-users_at_cool.haxx.se
Date: Monday, July 21, 2008, 2:53 PM

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

-------------------------------------------------------------------
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-22