diff --git a/HttpServer/Http/Response.php b/HttpServer/Http/Response.php index 366cd527..81531d11 100644 --- a/HttpServer/Http/Response.php +++ b/HttpServer/Http/Response.php @@ -101,6 +101,12 @@ class Response extends Application */ public function addHeader($key, $value) { + if ( + !($this->response instanceof SResponse) || + !($this->response instanceof S2Response) + ) { + return; + } $this->response->header($key, $value); }