mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-12-04 04:37:46 +08:00
Fix duplicate content-type definition (#5481)
This commit is contained in:
parent
0db2351130
commit
41fe521084
@ -200,7 +200,11 @@ class CoreMiddleware implements CoreMiddlewareInterface
|
||||
->withBody(new SwooleStream((string) $response));
|
||||
}
|
||||
|
||||
return $this->response()->withAddedHeader('content-type', 'text/plain')->withBody(new SwooleStream((string) $response));
|
||||
if ($this->response()->hasHeader('content-type')) {
|
||||
return $this->response()->withBody(new SwooleStream((string) $response));
|
||||
}
|
||||
|
||||
return $this->response()->withHeader('content-type', 'text/plain')->withBody(new SwooleStream((string) $response));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user