mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
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:
parent
7b2ac816c6
commit
9e15042eff
1 changed files with 1 additions and 1 deletions
|
@ -159,7 +159,7 @@ class HttpSocketResponse implements ArrayAccess {
|
||||||
$this->raw = $message;
|
$this->raw = $message;
|
||||||
$this->body = (string)substr($message, strlen($match[0]));
|
$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->httpVersion = $match[1];
|
||||||
$this->code = $match[2];
|
$this->code = $match[2];
|
||||||
$this->reasonPhrase = $match[3];
|
$this->reasonPhrase = $match[3];
|
||||||
|
|
Loading…
Add table
Reference in a new issue