summaryrefslogtreecommitdiff
path: root/inc/HTTPClient.php
diff options
context:
space:
mode:
authorTom N Harris <tnharris@whoopdedo.org>2009-05-28 23:50:37 +0200
committerTom N Harris <tnharris@whoopdedo.org>2009-05-28 23:50:37 +0200
commit80788871bb980cfc9b2c6f4744ebf2fdc39b2b5b (patch)
tree35154e42e5ac30e56ca6c35bc6f6dc1398736a3f /inc/HTTPClient.php
parent4b7f9e7005c4562f8b4b554ea5ea53fb1ebf804a (diff)
downloadrpg-80788871bb980cfc9b2c6f4744ebf2fdc39b2b5b.tar.gz
rpg-80788871bb980cfc9b2c6f4744ebf2fdc39b2b5b.tar.bz2
Clean up cookie handler in HTTPClient
darcs-hash:20090528215037-6942e-be53039ae592c50c481ea61528eca76db7e59328.gz
Diffstat (limited to 'inc/HTTPClient.php')
-rw-r--r--inc/HTTPClient.php5
1 files changed, 2 insertions, 3 deletions
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;
}
}