From 80788871bb980cfc9b2c6f4744ebf2fdc39b2b5b Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Thu, 28 May 2009 23:50:37 +0200 Subject: Clean up cookie handler in HTTPClient darcs-hash:20090528215037-6942e-be53039ae592c50c481ea61528eca76db7e59328.gz --- inc/HTTPClient.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'inc/HTTPClient.php') diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php index 7efe39a9c..06a69fd55 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -291,15 +291,14 @@ class HTTPClient { $this->resp_headers = $this->_parseHeaders($r_headers); if(isset($this->resp_headers['set-cookie'])){ foreach ((array) $this->resp_headers['set-cookie'] as $cookie){ - list($cookie) = explode(';',$cookie); - list($key,$val) = explode('=',$cookie); + list($cookie) = explode(';',$cookie,2); + list($key,$val) = explode('=',$cookie,3); $key = trim($key); if($val == 'deleted'){ if(isset($this->cookies[$key])){ unset($this->cookies[$key]); } }elseif($key){ - if($key) $this->client->cookies[$key] = $val; $this->cookies[$key] = $val; } } -- cgit v1.2.3