diff --git a/app/controllers/general.php b/app/controllers/general.php index 50d56ff9fd..8abca96742 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -718,7 +718,16 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw continue; } - $response->setHeader($name, $values); + if (\is_array($values)) { + $count = 0; + foreach ($values as $value) { + $override = $count === 0; + $response->addHeader($name, $value, override: $override); + $count++; + } + } else { + $response->addHeader($name, $values); + } } $response diff --git a/composer.lock b/composer.lock index 11b9a519c2..bd70f229ad 100644 --- a/composer.lock +++ b/composer.lock @@ -3942,16 +3942,16 @@ }, { "name": "utopia-php/framework", - "version": "0.33.24", + "version": "0.33.27", "source": { "type": "git", "url": "https://github.com/utopia-php/http.git", - "reference": "5112b1023342163e3fbedec99f38fc32c8700aa0" + "reference": "d9d10a895e85c8c7675220347cc6109db9d3bd37" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/http/zipball/5112b1023342163e3fbedec99f38fc32c8700aa0", - "reference": "5112b1023342163e3fbedec99f38fc32c8700aa0", + "url": "https://api.github.com/repos/utopia-php/http/zipball/d9d10a895e85c8c7675220347cc6109db9d3bd37", + "reference": "d9d10a895e85c8c7675220347cc6109db9d3bd37", "shasum": "" }, "require": { @@ -3983,9 +3983,9 @@ ], "support": { "issues": "https://github.com/utopia-php/http/issues", - "source": "https://github.com/utopia-php/http/tree/0.33.24" + "source": "https://github.com/utopia-php/http/tree/0.33.27" }, - "time": "2025-09-04T04:18:39+00:00" + "time": "2025-09-07T18:40:53+00:00" }, { "name": "utopia-php/image", @@ -4627,16 +4627,16 @@ }, { "name": "utopia-php/swoole", - "version": "0.8.3", + "version": "0.8.4", "source": { "type": "git", "url": "https://github.com/utopia-php/swoole.git", - "reference": "1af73dd3e73987cf729c7db399054e4a70befd99" + "reference": "150c30700e738c52348cce9ed0e0f0ff96872081" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/swoole/zipball/1af73dd3e73987cf729c7db399054e4a70befd99", - "reference": "1af73dd3e73987cf729c7db399054e4a70befd99", + "url": "https://api.github.com/repos/utopia-php/swoole/zipball/150c30700e738c52348cce9ed0e0f0ff96872081", + "reference": "150c30700e738c52348cce9ed0e0f0ff96872081", "shasum": "" }, "require": { @@ -4672,9 +4672,9 @@ ], "support": { "issues": "https://github.com/utopia-php/swoole/issues", - "source": "https://github.com/utopia-php/swoole/tree/0.8.3" + "source": "https://github.com/utopia-php/swoole/tree/0.8.4" }, - "time": "2025-03-26T10:09:05+00:00" + "time": "2025-09-07T09:39:46+00:00" }, { "name": "utopia-php/system", diff --git a/src/Appwrite/Utopia/Response.php b/src/Appwrite/Utopia/Response.php index 4a59ce77ad..67fc83b9fd 100644 --- a/src/Appwrite/Utopia/Response.php +++ b/src/Appwrite/Utopia/Response.php @@ -955,24 +955,6 @@ class Response extends SwooleResponse return !empty($this->filters); } - /** - * Set Header - * - * @param string $key - * @param string|array $value - * @return void - */ - public function setHeader(string $key, mixed $value): void - { - if (is_array($value)) { - // Temporary solution to support proxying Set-cookie (2 cookies, 1 name) - // Ideally this would live in http library, supporting array of values in all adapters - $this->swoole->header($key, $value); - } else { - $this->sendHeader($key, $value); - } - } - /** * Static wrapper to show sensitive data in response *