diff --git a/src/Appwrite/Utopia/Response.php b/src/Appwrite/Utopia/Response.php index a71e9a1e8d..8143c7b153 100644 --- a/src/Appwrite/Utopia/Response.php +++ b/src/Appwrite/Utopia/Response.php @@ -726,6 +726,7 @@ class Response extends SwooleResponse } $this + ->setContentType($multipart->exportHeader()) ->send($multipart->exportBody()); } diff --git a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php index aedcdada21..aface6e822 100644 --- a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php +++ b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php @@ -1491,6 +1491,8 @@ class FunctionsCustomServerTest extends Scope $this->assertEquals(201, $execution['headers']['status-code']); $this->assertStringContainsString('multipart/form-data', $execution['headers']['content-type']); + $contentType = explode(';', $execution['headers']['content-type']); + $this->assertStringContainsString('boundary=----', $contentType[1]); $bytes = unpack('C*byte', $execution['body']['responseBody']); $this->assertCount(3, $bytes); $this->assertEquals(0, $bytes['byte1']);