Browse Source

修复一个误注释,HTTP头返回运行环境

oott123 11 years ago
parent
commit
69b2c90c61
1 changed files with 3 additions and 3 deletions
  1. 3 3
      include/controller.php

+ 3 - 3
include/controller.php

@@ -72,7 +72,7 @@ class controller{
 				$basename = basename($request);
 				$ext = strtolower(substr($basename,strrpos($basename,'.')+1));
 				if(isset($mime_types[$ext])){
-					//$this->content_type=$mime_types[$ext];
+					$this->content_type=$mime_types[$ext];
 				}
 				$direct = false;
 				if(in_array($ext,explode('|',strtolower(DIRECT_EXT)))){
@@ -146,9 +146,9 @@ class controller{
 			return ;
 		}else{
 			if($this->hit){
-				header('Layer-Cache: Hit;key='.$this->hit);
+				header('Layer-Cache: Hit;key='.$this->hit.';ENV='.RUN_ENV);
 			}else{
-				header('Layer-Cache: Miss');
+				header('Layer-Cache: Miss;ENV='.RUN_ENV);
 			}
 			header("Expires: " . date("D, j M Y H:i:s GMT", time()+2592000));//缓存一月
 			header('Content-type: '.$this->content_type);