mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixed issue that lead HttpSocket to choke on big files (> 100kb)
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5942 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
7e57a4d28b
commit
73d873acaa
1 changed files with 4 additions and 3 deletions
|
@ -322,9 +322,10 @@ class HttpSocket extends CakeSocket {
|
|||
}
|
||||
|
||||
$response = $responseTemplate;
|
||||
|
||||
if (preg_match("/(.+\r\n)(.*)(?<=\r\n)\r\n(.+)\$/DUs", $message, $match)) {
|
||||
list($response['raw']['response'], $response['raw']['status-line'], $response['raw']['header'], $response['raw']['body']) = $match;
|
||||
if (preg_match("/^(.+\r\n)(.*)(?<=\r\n)\r\n/Us", $message, $match)) {
|
||||
list(, $response['raw']['status-line'], $response['raw']['header']) = $match;
|
||||
$response['raw']['response'] = $message;
|
||||
$response['raw']['body'] = substr($message, strlen($match[0]));
|
||||
|
||||
if (preg_match("/(.+) ([0-9]{3}) (.+)\r\n/DU", $response['raw']['status-line'], $match)) {
|
||||
$response['status']['http-version'] = $match[1];
|
||||
|
|
Loading…
Reference in a new issue