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=[
7979` ` `
8080
8181# # 📍 Todo
82- - [ ] 可以正常上线使用(主要)
82+ - [x ] 可以正常上线使用(主要)
8383- [ ] 添加注释
8484- [ ] Web界面
8585- [ ] 统一的管理API
Original file line number Diff line number Diff line change @@ -66,7 +66,8 @@ public function startserver() {
6666 }
6767 $ code = 206 ;
6868 $ 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 );
7071 $ response ->sendfile ($ filepath ,$ start_byte ,$ length );
7172 }
7273 else {
@@ -78,7 +79,8 @@ public function startserver() {
7879 }
7980 $ code = 200 ;
8081 $ 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 );
8284 $ response ->sendfile ($ filepath );
8385 }
8486 }
Original file line number Diff line number Diff line change 44use function Swoole \Timer ;
55declare (ticks=1 )
66require './config.php ' ;
7- const PHPOBAVERSION = '0 .0.1 ' ;
7+ const PHPOBAVERSION = '1 .0.0 ' ;
88const VERSION = '1.10.4 ' ;
99global $ DOWNLOAD_DIR ;
1010$ DOWNLOAD_DIR = $ config ['file ' ]['cache_dir ' ];
1919$ pid = getmypid ();
2020global $ enable ;
2121$ enable = false ;
22- echo "OpenBmclApionPHP v " . PHPOBAVERSION . "- " . VERSION . " -dev " . PHP_EOL ;
22+ echo "OpenBmclApionPHP v " . PHPOBAVERSION . "- " . VERSION . PHP_EOL ;
2323run (function ()use ($ config ){
2424 //注册信号处理器
2525 function registerSigintHandler () {
You can’t perform that action at this time.
0 commit comments