Bug #13038 Updated: Cookie Error in Net/Curl.php

From: Date: Thu, 30 Aug 2001 12:06:47 +0000
Subject: Bug #13038 Updated: Cookie Error in Net/Curl.php
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-64699@lists.php.net to get a copy of this message
ID: 13038
User updated by: olaf@sevenval.de
Reported By: olaf@sevenval.de
Status: Open
Bug Type: HTTP related
Operating System: all
PHP Version: 4.0.6
New Comment:

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);   }


Previous Comments:
------------------------------------------------------------------------

[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)

« previous php.dev (#64699) next »