php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: zw_uk at hotmail dot com
New email:
PHP Version: OS:

 

 [2014-12-31 00:46 UTC] zw_uk at hotmail dot com
Description:
------------
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.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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

Thank you for the report!
 [2015-02-15 07:50 UTC] mike@php.net
master of pecl_http, that is. You did not mention which version you're on.
 [2015-02-19 09:27 UTC] mike@php.net
-Status: Assigned +Status: Feedback
 [2015-02-19 09:27 UTC] mike@php.net
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: Tue Apr 16 17:01:30 2024 UTC