cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: RE: curl win32 commandline question

From: Kevin P Roth <kproth_at_MarathonOil.com>
Date: Wed, 14 Mar 2001 15:41:15 -0600

-L would follow "redirects" that appear in Location: headers in the HTTP response. Since there wasn't one in your sample, -L isn't needed. I know the manual says something about -b enabling a "cookie-parser" which is handy when also using -L, but since you don't have a location header here, that doesn't apply.

Daniel (or some other knowledgable soul): could someone explain a little more fully this portion of the curl --manual (I got this from v7.5.1):

  Note that by specifying -b you enable the "cookie awareness" and with -L
  you can make curl follow a location: (which often is used in combination
  with cookies). So that if a site sends cookies and a location, you can
  use a non-existing file to trig the cookie awareness like:
        curl -L -b empty-file www.example.com

Specifically, how is "cookie awareness" different from storing headers in one file via -D and reading them via -b? And could you elaborate again on how to make that headers file track the headers across several requests? I remember trying before using the same file in both -D and -b, and it seems that the prior contents of that file were getting overwritten and it wasn't really working as intended... I do remember that your suggestion was to manage the contents of my headers file externally to curl (such as with my shell script that is controlling curl) but I'm wondering if this behavior has changed at all since that comment several version ago.

An ASPSESSIONID is a Microsoft IIS thing; it identifies your session on the server, which expires (by default) after 20 minutes of inactivity. So if you're waiting too long between requests, that could have something to do with why this isn't working for you.

--Kevin

>>> "Peter meulmeester" <pmeulmeester_at_heyde.nl> 3/14/01 4:19 AM >>>
Expires: Wed, 14 Mar 2001 09:11:39 GMT
Set-Cookie: ASPSESSIONIDGQGGGQDM=BGCKOHPCAJLBHIOAEJLEIEGC; path=/

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

Also -L -b empty-file
Also -b previous-header-file
Received on 2001-03-14