diff --git a/Protocols/Http/Request.php b/Protocols/Http/Request.php index 148e92062..301c67a97 100644 --- a/Protocols/Http/Request.php +++ b/Protocols/Http/Request.php @@ -164,7 +164,7 @@ public function cookie($name = null, $default = null) { if (!isset($this->_data['cookie'])) { $this->_data['cookie'] = array(); - \parse_str(\str_replace('; ', '&', $this->header('cookie', '')), $this->_data['cookie']); + \parse_str(\preg_replace('/; ?/', '&', $this->header('cookie', '')), $this->_data['cookie']); } if ($name === null) { return $this->_data['cookie'];