Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Define the protocol property on the response.
This is a temporary solution until the response is made PSR7 compliant
as well.
  • Loading branch information
markstory committed May 8, 2016
1 parent 592daec commit 1bf62e0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Http/Client/Response.php
Expand Up @@ -89,6 +89,12 @@
*/
class Response extends Message
{
/**
* This is temporary until the response is made PSR7 compliant as well.
*
* @var string
*/
protected $protocol = '1.1';

/**
* The status code of the response.
Expand Down Expand Up @@ -187,7 +193,7 @@ protected function _parseHeaders($headers)
foreach ($headers as $key => $value) {
if (substr($value, 0, 5) === 'HTTP/') {
preg_match('/HTTP\/([\d.]+) ([0-9]+)/i', $value, $matches);
$this->_version = $matches[1];
$this->protocol = $matches[1];
$this->_code = $matches[2];
continue;
}
Expand Down

0 comments on commit 1bf62e0

Please sign in to comment.