curl-library
Re: Problem with cookie
Date: Thu, 11 Apr 2002 09:49:43 +0200 (MET DST)
On Thu, 11 Apr 2002, Mandar Wadekar wrote:
> OS : Win NT 4
> Compiler : MSVC++ 6.0
> CURL version : 7.9.5
>
> Here is my code :
[ cut out]
> All I am doing is enabling cookie-parser. I can even see the cookie
> received, being saved in cookie.ck file, for the first request. For the
> next request, cookie would be automatically sent. But that does not happen.
> After setting VERBOSE, curl spits out the header that is being sent. But I
> do not see the cookie being sent. I even tried using CURLOPT_COOKIE option,
> by setting the cookie myself. The result was worst. The server rejected the
> request (Response from server : Malformed syntax).
>
> Am I obviously missing something here? I would really appreciate if I get
> some pointers.
Showing some real-world data to us would help a lot here (edit out sensitive
info first).
- What cookies are received in the first request? (Showing both headers and
the cookiejar)
- What URL is the second one?
- What does the second request look like?
- How did you use CURLOPT_COOKIE since it created a "malformed" request?
BTW, if you do two requests in a row like that, you're better off *not* doing
cleanup and init again between the requests but instead just re-use the same
handle...
-- Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/Received on 2002-04-11