改名
This commit is contained in:
@@ -211,7 +211,6 @@ class Response extends HttpService implements ResponseInterface
|
|||||||
public function configure(SResponse $response): static
|
public function configure(SResponse $response): static
|
||||||
{
|
{
|
||||||
$response->setStatusCode($this->statusCode);
|
$response->setStatusCode($this->statusCode);
|
||||||
$response->header('Content-Type', $this->getResponseFormat());
|
|
||||||
$response->header('Run-Time', $this->getRuntime());
|
$response->header('Run-Time', $this->getRuntime());
|
||||||
if (!empty($this->headers)) {
|
if (!empty($this->headers)) {
|
||||||
foreach ($this->headers as $name => $header) {
|
foreach ($this->headers as $name => $header) {
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ class ResponseEmitter
|
|||||||
if ($content instanceof FileFormatter) {
|
if ($content instanceof FileFormatter) {
|
||||||
$this->download($content->getData(), $response);
|
$this->download($content->getData(), $response);
|
||||||
} else {
|
} else {
|
||||||
|
$response->header('Content-Type', $emitter->getResponseFormat());
|
||||||
$response->end($content->getData());
|
$response->end($content->getData());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user