Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.4.4

Bug #2741 Handling of secure cookies
Submitted: 2004-11-12 08:38 UTC Modified: 2006-12-26 23:47 UTC
From: fredericpoeydomenge Assigned: avb
Status: Closed Package: HTTP_Request
PHP Version: 4.3.9 OS: Debian GNU/Linux 3.0R2
Roadmaps: (Not assigned)    
Subscription  


 [2004-11-12 08:38 UTC] fredericpoeydomenge
Description: ------------ A warning is displayed when sending a request to a page containing secure cookie(s) Reproduce code: --------------- page1.php <?php include('HTTP/Request.php'); $req = & new HTTP_Request( 'page2.php', array('method'=>'HEAD','http'=>'1.1') ); $req->sendRequest(); ?> page2.php <?php setcookie('name','value',time()+60,'/dir','www.example.com',TRUE); ?> Actual result: -------------- Notice: Undefined offset: 1 in /usr/share/pear/HTTP/Request.php on line 1070

Comments

 [2004-11-15 04:57 UTC] avb
The code in _parseCookie() tries to split all the cookie parameters on '=' character. 'secure' parameter does not have any value, hence the warning. The code should check for presence of '=' before trying to split.
 [2004-12-10 09:49 UTC] avb
Fixed in CVS.