Merge pull request #398 from outtimes/master

修复直接下载header
pull/403/head
warlee 2020-02-14 21:14:17 +08:00 committed by GitHub
commit 2db6c24867
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -1042,9 +1042,9 @@ function file_put_out($file,$download=-1,$downFilename=false){
$server = strtolower($_SERVER['SERVER_SOFTWARE']);
if($server && $GLOBALS['config']['settings']['httpSendFile']){
if(strstr($server,'nginx')){//nginx
header("X-Sendfile: ".$file);
}else if(strstr($server,'apache')){ //apache
header('X-Accel-Redirect: '.$file);
}else if(strstr($server,'apache')){ //apache
header("X-Sendfile: ".$file);
}else if(strstr($server,'http')){//light http
header( "X-LIGHTTPD-send-file: " . $file);
}
@ -1447,4 +1447,4 @@ function write_log($log, $type = 'default', $level = 'log'){
}
clearstatcache();
return error_log("$now_time $log\n", 3, $target);
}
}