Skip to content
Permalink
Browse files

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 1bf62e02fd5788c917289b0b321633f3d64d22d7
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/Http/Client/Response.php
@@ -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.
@@ -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;
}

0 comments on commit 1bf62e0

Please sign in to comment.
You can’t perform that action at this time.