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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
38 - 20 = ?
Subscribe to this entry?

 
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Thu May 09 09:01:31 2024 UTC