diff --git a/HttpServer/Http/Response.php b/HttpServer/Http/Response.php index 2fc77536..46e879e6 100644 --- a/HttpServer/Http/Response.php +++ b/HttpServer/Http/Response.php @@ -219,7 +219,11 @@ class Response extends HttpService $this->response->status($status); $this->response->header('Content-Type', $this->getContentType()); $this->response->header('Run-Time', $this->getRuntime()); - $this->response->end($this->headers($sendData)); + if (!empty($sendData)) { + $this->response->end($this->headers($sendData)); + } else { + $this->response->end(); + } $this->response = null; unset($this->response); return $sendData;