From 3659a761061ef993de39e5687750c3abf01f2d4a Mon Sep 17 00:00:00 2001 From: Belle Aerni Date: Wed, 10 Apr 2024 17:44:13 -0700 Subject: [PATCH] Fix content length when using response body callbacks --- flight/net/Response.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flight/net/Response.php b/flight/net/Response.php index 9161f18..d5d3afa 100644 --- a/flight/net/Response.php +++ b/flight/net/Response.php @@ -432,15 +432,15 @@ class Response } } - if (!headers_sent()) { - $this->sendHeaders(); // @codeCoverageIgnore - } - // Only for the v3 output buffering. if ($this->v2_output_buffering === false) { $this->processResponseCallbacks(); } + if (!headers_sent()) { + $this->sendHeaders(); // @codeCoverageIgnore + } + echo $this->body; $this->sent = true;