改名
This commit is contained in:
@@ -101,15 +101,20 @@ class Response extends Application
|
|||||||
*/
|
*/
|
||||||
public function addHeader($key, $value)
|
public function addHeader($key, $value)
|
||||||
{
|
{
|
||||||
if (
|
if ($this->isClient()) {
|
||||||
!($this->response instanceof SResponse) ||
|
|
||||||
!($this->response instanceof S2Response)
|
|
||||||
) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$this->response->header($key, $value);
|
$this->response->header($key, $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
private function isClient()
|
||||||
|
{
|
||||||
|
return !($this->response instanceof SResponse) && !($this->response instanceof S2Response);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $context
|
* @param string $context
|
||||||
* @param int $statusCode
|
* @param int $statusCode
|
||||||
|
|||||||
Reference in New Issue
Block a user