aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2017-10-20 08:58:46 +0200
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2017-10-20 08:58:46 +0200
commit4bf79088dad870a12078c5ba3d91157506f989f0 (patch)
treeed4622c33b3f8787a3b93c8fc980901c32e98a41
parentb741a49c0e0638ac7f43b6689fc25b563a5f6e46 (diff)
downloadFastcgi-4bf79088dad870a12078c5ba3d91157506f989f0.zip
Fastcgi-4bf79088dad870a12078c5ba3d91157506f989f0.tar.gz
Fastcgi-4bf79088dad870a12078c5ba3d91157506f989f0.tar.bz2
fix(Responder) Reset response content when sending.
Reset the response content before sending any message, to prevent having the response content of the previous exchange when the current one fails.
-rw-r--r--Responder.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/Responder.php b/Responder.php
index a9c40b5..d21899a 100644
--- a/Responder.php
+++ b/Responder.php
@@ -179,6 +179,8 @@ class Responder extends Connection
*/
public function send(array $headers, $content = null)
{
+ $this->_content = null;
+
$client = $this->getClient();
$client->connect();
$client->setStreamBlocking(true);