Skip to content

Commit 6b54958

Browse files
committed
fix tests
1 parent f6ac882 commit 6b54958

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Server/Transport/StreamableHttpTransport.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ protected function createJsonResponse(): ResponseInterface
124124
}
125125

126126
$messages = array_column($outgoingMessages, 'message');
127-
$responseBody = 1 === \count($messages) ? $messages[0] : '[' . implode(',', $messages) . ']';
127+
$responseBody = 1 === \count($messages) ? $messages[0] : '['.implode(',', $messages).']';
128128

129129
$response = $this->responseFactory->createResponse(200)
130130
->withHeader('Content-Type', 'application/json')
@@ -242,7 +242,7 @@ protected function createErrorResponse(Error $jsonRpcError, int $statusCode): Re
242242
->withHeader('Content-Type', 'application/json')
243243
->withBody($this->streamFactory->createStream($payload));
244244

245-
if (405 === $statusCode) {
245+
if ($statusCode === 405) {
246246
$response = $response->withHeader('Allow', 'POST, DELETE, OPTIONS');
247247
}
248248

0 commit comments

Comments
 (0)