cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: curl win32 commandline question

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 14 Mar 2001 10:26:03 +0100 (MET)

On Wed, 14 Mar 2001, Peter meulmeester wrote:

> curl -A 'Mozilla/5.0'
> "http://www.aex.nl/scripts/marktinfo/Optiekoersen.asp?taal=nl&Symbool=KPN&a=
> 1&History=YES"
>
> gives header:
>
> HTTP/1.0 200 OK
> Set-Cookie: ASPSESSIONIDGQGGGQDM=BGCKOHPCAJLBHIOAEJLEIEGC; path=/

[I cut off a few headers]

> I tried the -b "ASPSESSIONIDGQGGGQDM=BGCKOHPCAJLBHIOAEJLEIEGC" option but
> did not work.

That should work, if the cookie is all it requires.

> Also -L -b empty-file

That wouldn't work since it didn't send any Location: header.

> Also -b previous-header-file

That should work if you first fetch the cookie (all headers actually) when it
is set with "curl -D previous-header-file ...".

> Is there a way to trick this server?

I can't possibly say. There are many ways the server can put restraints or
try to detect that you're not a true browser and refuse to serve you.

> Should I try lynx in this case which has an option accept-all-cookies?

I don't think this is a cookie issue. curl will do the cookies just fine, I
can't see what lynx would do differently in regard to cookies. Of course,
trying different browsers will probably give you more info and perhaps enable
you to understand how to proceed.

It is also quite possible that the server updates that cookie at times, so
you better check that.

-- 
  Daniel Stenberg -- curl project maintainer -- http://curl.haxx.se/
Received on 2001-03-14