We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2554226 commit 00bf8eeCopy full SHA for 00bf8ee
src/Adoy/FastCGI/Client.php
@@ -70,6 +70,8 @@ class Client
70
const REQ_STATE_ERR = 3;
71
const REQ_STATE_TIMED_OUT = 4;
72
73
+ const FCGI_MAX_LENGTH = 0xffff;
74
+
75
/**
76
* Socket
77
* @var Resource
@@ -475,6 +477,11 @@ public function async_request(array $params, $stdin)
475
477
$request .= $this->buildPacket(self::PARAMS, '', $id);
476
478
479
if ($stdin) {
480
+ while (strlen($stdin) > self::FCGI_MAX_LENGTH) {
481
+ $chunkStdin = substr($stdin, 0, self::FCGI_MAX_LENGTH);
482
+ $request .= $this->buildPacket(self::STDIN, $chunkStdin, $id);
483
+ $stdin = substr($stdin, self::FCGI_MAX_LENGTH);
484
+ }
485
$request .= $this->buildPacket(self::STDIN, $stdin, $id);
486
}
487
$request .= $this->buildPacket(self::STDIN, '', $id);
0 commit comments