changed regexp for response code

Facebook servers have now HTTP response without status string. The use 
"HTTP/1.1 200 "
while CakePHP needs 
"HTTP/1.1 200 Ok"
because preg_match() in code use + instead *
This commit is contained in:
samokspv 2014-03-13 19:11:14 +02:00
parent 7b2ac816c6
commit 9e15042eff

View file

@ -159,7 +159,7 @@ class HttpSocketResponse implements ArrayAccess {
$this->raw = $message;
$this->body = (string)substr($message, strlen($match[0]));
if (preg_match("/(.+) ([0-9]{3}) (.+)\r\n/DU", $statusLine, $match)) {
if (preg_match("/(.+) ([0-9]{3}) (.*)\r\n/DU", $statusLine, $match)) {
$this->httpVersion = $match[1];
$this->code = $match[2];
$this->reasonPhrase = $match[3];