Skip to content

Commit 79bd341

Browse files
committed
Update HttpResponse.php
1 parent 33c6fd4 commit 79bd341

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/HttpResponse.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ public function send(int $code = null, string $body = null, array $headers = nul
110110
if (!empty($code)) $this->withStatusCode($code);
111111
if (!empty($headers)) $this->withAddedHeaders($headers);
112112
if (!empty($body)) $this->write($body);
113-
if ('application/json' === $this->getHeader('Content-Type')) {
113+
$type = $this->getHeader('Content-Type');
114+
if (false !== strpos($type, 'application/json')) {
114115
$this->withBodyJson($this->getBody());
115116
}
116117
if (method_exists($this, 'realSend')) {

0 commit comments

Comments
 (0)