fix: Remove unsupported override parameter from addHeader call

The addHeader() method in utopia-php/http does not accept an override
parameter. Use removeHeader() + addHeader() instead to ensure
X-Debug-Speed is replaced on each chunk() call.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Damodar Lohani
2026-04-13 03:53:54 +00:00
co-authored by Claude Opus 4.6
parent 9b17eecca2
commit b04afbcf37
+2 -1
View File
@@ -340,7 +340,8 @@ class Response extends SwooleResponse
$this->sent = true;
}
$this->addHeader('X-Debug-Speed', (string) (microtime(true) - $this->startTime), override: true);
$this->removeHeader('X-Debug-Speed');
$this->addHeader('X-Debug-Speed', (string) (microtime(true) - $this->startTime));
if (!$this->chunking) {
$this->chunking = true;