force application/json for the 202 if there are no messages in the queue when building a json response (#295)
This commit is contained in:
parent
86bd845924
commit
a929548f33
1 changed files with 2 additions and 1 deletions
|
|
@ -144,7 +144,8 @@ class StreamableHttpTransport extends BaseTransport
|
|||
$outgoingMessages = $this->getOutgoingMessages($this->sessionId);
|
||||
|
||||
if (empty($outgoingMessages)) {
|
||||
return $this->responseFactory->createResponse(202);
|
||||
return $this->responseFactory->createResponse(202)
|
||||
->withHeader('Content-Type', 'application/json');
|
||||
}
|
||||
|
||||
$messages = array_column($outgoingMessages, 'message');
|
||||
|
|
|
|||
Loading…
Reference in a new issue