Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.
Prev Previous commit
Next Next commit
replace allPreserveCaseWithoutCookie with allPreserveCase to support …
…Laravel 5.1 and 5.2
  • Loading branch information
albertcht committed May 5, 2018
commit 2b7d6cc351e46e9fff7ccce293ba41f9f5277248
7 changes: 6 additions & 1 deletion src/Server/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,12 @@ protected function sendHeaders()
}

// headers
foreach ($illuminateResponse->headers->allPreserveCaseWithoutCookies() as $name => $values) {
// allPreserveCaseWithoutCookies() doesn't exist before Laravel 5.3
$headers = $illuminateResponse->headers->allPreserveCase();
if (isset($headers['Set-Cookie'])) {
unset($headers['Set-Cookie']);
}
foreach ($headers as $name => $values) {
foreach ($values as $value) {
$this->swooleResponse->header($name, $value);
}
Expand Down