diff --git a/library/think/Request.php b/library/think/Request.php index a30180a8..3974d893 100644 --- a/library/think/Request.php +++ b/library/think/Request.php @@ -455,7 +455,7 @@ class Request */ public function type() { - $accept = isset($this->server['HTTP_ACCEPT']) ? $this->server['HTTP_ACCEPT'] : $_SERVER['HTTP_ACCEPT']; + $accept = $this->server('HTTP_ACCEPT'); if (empty($accept)) { return false; }