Bug #13038 Updated: Cookie Error in Net/Curl.php
ID: 13038
Updated by: sterling
Reported By: olaf@sevenval.de
Old Status: Open
Status: Closed
Bug Type: HTTP related
Operating System: all
PHP Version: 4.0.6
New Comment:
fixed in cvs, thanks.
Previous Comments:
------------------------------------------------------------------------
[2001-08-30 08:06:47] olaf@sevenval.de
line 319:
$ret = curl_setopt($ch, CURLOPT_COOKIE, $cookie_data);
may cause a warning, if cookies is an empty array.
Better:
if(!empty($cookie_data){
$ret = curl_setopt($ch, CURLOPT_COOKIE, $cookie_data); }
------------------------------------------------------------------------
[2001-08-29 13:26:03] olaf@sevenval.de
In Curl.php around line 316 multiple cookies are concatenated with newline. Shold be semicolon:
if (isset($this->cookies)) {
foreach ($this->cookies as $name => $value) {
$cookie_data .= urlencode($name) . ": " .\ urlencode($value);
$cookie_data .= ";"; // This is correct, before it was "\n"
}
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=13038&edit=1
Thread (3 messages)