aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2017-06-26 14:42:54 +0200
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2017-06-26 14:42:54 +0200
commitb741a49c0e0638ac7f43b6689fc25b563a5f6e46 (patch)
tree236d3e68e172783e517b9a0df089222e834ce779
parent8ea182c7601af96ec27cc5e99353cf14f4850f7c (diff)
downloadFastcgi-b741a49c0e0638ac7f43b6689fc25b563a5f6e46.zip
Fastcgi-b741a49c0e0638ac7f43b6689fc25b563a5f6e46.tar.gz
Fastcgi-b741a49c0e0638ac7f43b6689fc25b563a5f6e46.tar.bz2
Responder: Simplify a little bit the code.
-rw-r--r--Responder.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/Responder.php b/Responder.php
index b8bd888..a9c40b5 100644
--- a/Responder.php
+++ b/Responder.php
@@ -203,17 +203,17 @@ class Responder extends Connection
$request .= $this->pack(self::REQUEST_PARAMETERS, '');
if (null !== $content) {
- // The maximum length of each record is 65535 bytes, pack multiple
- // records if the length is larger than the 65535 bytes
- $contents = str_split($content, 65535);
- foreach ($contents as $content) {
- $request .= $this->pack(self::STREAM_STDIN, $content);
+ // The maximum length of each record is 65535 bytes.
+ // Pack multiple records if the length is larger than the
+ // 65535 bytes.
+ foreach (str_split($content, 65535) as $chunk) {
+ $request .= $this->pack(self::STREAM_STDIN, $chunk);
}
}
$request .= $this->pack(self::STREAM_STDIN, '');
$client->writeAll($request);
- $handle = null;
+ $handle = null;
do {
if (false === $handle = $this->readPack()) {