Doc #52581 [Opn->Csd]: "the connection closes" should be "curl handle is closed"
| From: | markskilbeck@php.net | Date: | Mon, 20 Sep 2010 11:07:51 +0000 |
| Subject: | Doc #52581 [Opn->Csd]: "the connection closes" should be "curl handle is closed" | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-5088@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=52581&edit=1
ID: 52581
Updated by: markskilbeck@php.net
Reported by: johan at qx dot se
Summary: "the connection closes" should be "curl handle is
closed"
-Status: Open
+Status: Closed
Type: Documentation Problem
Package: Documentation problem
Operating System: OS X (darwin 9.8.0)
PHP Version: 5.3.3
-Assigned To:
+Assigned To: markskilbeck
Block user comment: N
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
Previous Comments:
------------------------------------------------------------------------
[2010-09-20 13:07:19] markskilbeck@php.net
Automatic comment from SVN on behalf of markskilbeck
Revision: http://svn.php.net/viewvc/?view=revision&revision=303617
Log: #52581
------------------------------------------------------------------------
[2010-08-11 12:28:33] johan at qx dot se
bad copy pasting... The line
# connection is not kept alive, i.e. it's closed. cookiejar file
/tmp/cookiefile now exists
should obviously end with
file /tmp/cookiefile does not exist
------------------------------------------------------------------------
[2010-08-11 11:52:42] johan at qx dot se
Description:
------------
Documentation at http://se2.php.net/manual/en/function.curl-setopt.php
states
"CURLOPT_COOKIEJAR The name of a file to save all internal cookies to
when the connection closes."
However, the cookiejar file is created when the curl HANDLE is closed,
not when a connection is closed.
I suggest a change in the documentation to
""CURLOPT_COOKIEJAR The name of a file to save all internal cookies
to when the handle is closed, e.g. after a call to curl_close."
Test script:
---------------
$c = curl_init('http://example.com');
curl_setopt ($c, CURLOPT_COOKIEJAR, '/tmp/cookiefile');
for ($i = 0; $i < 3; ++$i) {
$r[] = curl_exec($c) . PHP_EOL;
# connection is not kept alive, i.e. it's closed. cookiejar file
/tmp/cookiefile now exists
file_get_contents('/tmp/cookiefile'); # error!
}
curl_close($c);
# cookiejar file /tmp/cookiefile now exists
file_get_contents('/tmp/cookiefile'); # ok
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=52581&edit=1