|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68702 Cookie persistence (pecl-http v2)
Submitted: 2014-12-31 00:46 UTC Modified: 2015-03-01 04:22 UTC
From: zw_uk at hotmail dot com Assigned: mike (profile)
Status: No Feedback Package: pecl_http (PECL)
PHP Version: 5.6.4 OS: FreeBSD 9.2-RELEASE
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2014-12-31 00:46 UTC] zw_uk at hotmail dot com
The instructions contained in KnownIssues.txt do not solve the problem:

	Persistent handles and "cookiestore" request option do interfere,
as libcurl saves the cookies to the file on curl_easy_destroy(),
cookies are not saved until the CURL handle will be recycled.
Thus one would either need to
* run PHP with raphf.persistent_handles.limit = 0
* call raphf\persistent_handles_clean() every request
* call $client->flushCookies(), which is available
since libcurl v7.17.1 and does not work with the
procedural API

Calling raphf\clean_persistent_handles() and setting raphf.persistent_handles.limit to zero does not fix the race condition with cookiestore. Essentially the cookie store facility does not work properly.

The following steps reproduce the problem:

1) Send a POST request with login credentials that cause a number of redirects with Set-Cookie headers.
2) Then create a new request and send it - the cookies will not be sent.
3) If the same cookie store file is preserved, the cookie store file (cookie jar) will be read after the next cycle.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-01-29 14:40 UTC]
-Assigned To: +Assigned To: mike
 [2015-02-15 07:49 UTC]
Could you try current master? I think this issue has been fixed already.

Thank you for the report!
 [2015-02-15 07:50 UTC]
master of pecl_http, that is. You did not mention which version you're on.
 [2015-02-19 09:27 UTC]
-Status: Assigned +Status: Feedback
 [2015-02-19 09:27 UTC]
Should be fixed with pecl_http-2.3.0RC1
 [2015-03-01 04:22 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 22 09:01:33 2024 UTC