curl-library
Re: libcurl does not update cookie
Date: Sun, 24 May 2015 20:47:54 +0300
On 5/24/2015 8:34 PM, Daniel Stenberg wrote:
> On Sun, 24 May 2015, Alexander Dyagilev wrote:
>
>> Unfortunately, this did not help.
>
> So what happens?
The same thing I've reported.
GET /test.php?n=2 HTTP/1.1
Host: [removed due to security reasons]
Accept: */*
Referer: [removed due to security reasons]
Cookie: test_cookie_2=base_value2
HTTP/1.1 302 Moved Temporarily
Server: nginx
Date: Sun, 24 May 2015 17:42:28 GMT
Content-Type: text/html
Transfer-Encoding: chunked
Connection: keep-alive
X-Powered-By: PHP/5.3.21
Set-Cookie: test_cookie_2=value2
Location: [removed due to security reasons]/test.php?n=1
0
GET /test.php?n=1 HTTP/1.1
Host: [removed due to security reasons]
Accept: */*
Referer: [removed due to security reasons]
Cookie: test_cookie_2=value2; test_cookie_2=base_value2
>
>> Got the same behavior.
>
> Two identical cookie headers? That seems very unlikely. Can you show
> us the latest incarnation of your code?
I use all the same options I mentioned when you requested them.
Except these two: CURLOPT_HTTPHEADER and CURLOPT_COOKIE. I removed them
from the code completely (for the testing purposes).
And I added the option you suggested:
curl_easy_setopt (m_curl, CURLOPT_COOKIELIST, "Set-Cookie:
test_cookie_2=base_value2");
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-05-24