php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13038 Cookie Error in Net/Curl.php
Submitted: 2001-08-29 13:26 UTC Modified: 2001-10-22 14:53 UTC
From: olaf at sevenval dot de Assigned:
Status: Closed Package: HTTP related
PHP Version: 4.0.6 OS: all
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: olaf at sevenval dot de
New email:
PHP Version: OS:

 

 [2001-08-29 13:26 UTC] olaf at sevenval dot 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"
}

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-08-30 08:06 UTC] olaf at sevenval dot 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-10-22 14:53 UTC] sterling@php.net
fixed in cvs, thanks.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed May 07 09:01:27 2025 UTC