This repository was archived by the owner on Mar 12, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ $config=[
79
79
` ` `
80
80
81
81
# # 📍 Todo
82
- - [ ] 可以正常上线使用(主要)
82
+ - [x ] 可以正常上线使用(主要)
83
83
- [ ] 添加注释
84
84
- [ ] Web界面
85
85
- [ ] 统一的管理API
Original file line number Diff line number Diff line change @@ -66,7 +66,8 @@ public function startserver() {
66
66
}
67
67
$ code = 206 ;
68
68
$ response ->header ('Content-Type ' , 'application/octet-stream ' );
69
- $ response ->header ('Content-Type ' , 'application/octet-stream ' );
69
+ $ response ->header ('Content-Disposition ' , $ allurl ['name ' ]);
70
+ $ response ->header ('x-bmclapi-hash ' , $ downloadhash );
70
71
$ response ->sendfile ($ filepath ,$ start_byte ,$ length );
71
72
}
72
73
else {
@@ -78,7 +79,8 @@ public function startserver() {
78
79
}
79
80
$ code = 200 ;
80
81
$ response ->header ('Content-Type ' , 'application/octet-stream ' );
81
- $ response ->header ('Content-Type ' , 'application/octet-stream ' );
82
+ $ response ->header ('Content-Disposition ' , $ allurl ['name ' ]);
83
+ $ response ->header ('x-bmclapi-hash ' , $ downloadhash );
82
84
$ response ->sendfile ($ filepath );
83
85
}
84
86
}
Original file line number Diff line number Diff line change 4
4
use function Swoole \Timer ;
5
5
declare (ticks=1 )
6
6
require './config.php ' ;
7
- const PHPOBAVERSION = '0 .0.1 ' ;
7
+ const PHPOBAVERSION = '1 .0.0 ' ;
8
8
const VERSION = '1.10.4 ' ;
9
9
global $ DOWNLOAD_DIR ;
10
10
$ DOWNLOAD_DIR = $ config ['file ' ]['cache_dir ' ];
19
19
$ pid = getmypid ();
20
20
global $ enable ;
21
21
$ enable = false ;
22
- echo "OpenBmclApionPHP v " . PHPOBAVERSION . "- " . VERSION . " -dev " . PHP_EOL ;
22
+ echo "OpenBmclApionPHP v " . PHPOBAVERSION . "- " . VERSION . PHP_EOL ;
23
23
run (function ()use ($ config ){
24
24
//注册信号处理器
25
25
function registerSigintHandler () {
You can’t perform that action at this time.
0 commit comments