Skip to content

Commit 597cba4

Browse files
committed
Remove resendHeaders
1 parent 8aea2b0 commit 597cba4

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

src/services/Sse.php

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,6 @@ private function processEvent(EventInterface $event): void
319319
{
320320
$this->verifySseMethodInProcess($event);
321321

322-
$this->resendHeaders();
323-
324322
$this->sseEvents[] = $event;
325323

326324
if ($this->isStreamedResponse) {
@@ -343,27 +341,6 @@ private function processEvent(EventInterface $event): void
343341
$this->setSseMethodInProcess(null);
344342
}
345343

346-
/**
347-
* Resends the response headers.
348-
*
349-
* @see Response::sendHeaders()
350-
*/
351-
private function resendHeaders(): void
352-
{
353-
if (headers_sent()) {
354-
return;
355-
}
356-
357-
foreach (Craft::$app->getResponse()->getHeaders() as $name => $values) {
358-
$name = str_replace(' ', '-', ucwords(str_replace('-', ' ', $name)));
359-
$replace = true;
360-
foreach ($values as $value) {
361-
header("$name: $value", $replace);
362-
$replace = false;
363-
}
364-
}
365-
}
366-
367344
/**
368345
* Verifies that another SSE method is not already in process.
369346
*/

0 commit comments

Comments
 (0)