mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
Use feof() in while loop
This commit is contained in:
parent
3995c70046
commit
7704efdb28
1 changed files with 2 additions and 2 deletions
|
@ -177,9 +177,9 @@ class CakeSocket {
|
||||||
$req[] = 'Host: ' . $this->config['host'];
|
$req[] = 'Host: ' . $this->config['host'];
|
||||||
$req[] = 'User-Agent: php proxy';
|
$req[] = 'User-Agent: php proxy';
|
||||||
|
|
||||||
fwrite($this->connection, implode("\r\n", $req)."\r\n\r\n");
|
fwrite($this->connection, implode("\r\n", $req) . "\r\n\r\n");
|
||||||
|
|
||||||
while(true) {
|
while (!feof($this->connection)) {
|
||||||
$s = rtrim(fgets($this->connection, 4096));
|
$s = rtrim(fgets($this->connection, 4096));
|
||||||
if (preg_match('/^$/', $s)) {
|
if (preg_match('/^$/', $s)) {
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Reference in a new issue