Skip to content

Commit

Permalink
Fix content length when using response body callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
BelleNottelling committed Apr 11, 2024
1 parent d92c65f commit 3659a76
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions flight/net/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -432,15 +432,15 @@ public function send(): void
}
}

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;
Expand Down

0 comments on commit 3659a76

Please sign in to comment.