Skip to content
This repository was archived by the owner on Mar 12, 2025. It is now read-only.

Commit a9b5949

Browse files
authored
Merge pull request #5 from AppleBlockTeam/main
同步dev
2 parents 4614bd9 + 6de39e6 commit a9b5949

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

inc/server.php

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function startserver() {
7070
$response->header('Content-Disposition', $allurl['name']);
7171
}
7272
$response->header('x-bmclapi-hash', $downloadhash);
73-
$result = $response->sendfile($filepath,$start_byte,$length);
73+
$response->sendfile($filepath,$start_byte,$length);
7474
}
7575
else{
7676
global $enable;
@@ -85,34 +85,29 @@ public function startserver() {
8585
$response->header('Content-Disposition', $allurl['name']);
8686
}
8787
$response->header('x-bmclapi-hash', $downloadhash);
88-
$result = $response->sendfile($filepath);
88+
$response->sendfile($filepath);
8989
}
9090
}
9191
else{
9292
$code = 403;
9393
$response->status($code);
9494
$response->header('Content-Type', 'text/html; charset=utf-8');
95-
$result = $response->end("<title>Error</title><pre>invalid sign</pre>");
95+
$response->end("<title>Error</title><pre>invalid sign</pre>");
9696
}
9797
}
9898
else{
9999
$code = 404;
100100
$response->status($code);
101101
$response->header('Content-Type', 'text/html; charset=utf-8');
102-
$result = $response->end("<title>Error</title><pre>404 Not Found</pre>");
102+
$response->end("<title>Error</title><pre>404 Not Found</pre>");
103103
}
104104
if(!isset($request->server['query_string'])){
105105
$url = $request->server['request_uri'];
106106
}
107107
else{
108108
$url = $request->server['request_uri']."?".$request->server['query_string'];
109109
}
110-
if($result){
111-
mlog(" Serve {$code} | {$request->server['remote_addr']} | {$request->server['server_protocol']} | {$url} | {$request->header['user-agent']};") ;
112-
}
113-
else{
114-
mlog("HttpServer Error!",2) ;
115-
}
110+
mlog(" Serve {$code} | {$request->server['remote_addr']} | {$request->server['server_protocol']} | {$url} | {$request->header['user-agent']};") ;
116111
});
117112
$server->handle('/measure', function ($request, $response) {
118113
$measuresize = str_replace('/measure/', '', $request->server['request_uri']);

main.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
use function Swoole\Timer;
55
declare(ticks=1)
66
require './config.php';
7-
const PHPOBAVERSION = '1.0.0';
7+
const PHPOBAVERSION = '1.2.0';
88
const VERSION = '1.10.4';
99
global $DOWNLOAD_DIR;
1010
$DOWNLOAD_DIR = $config['file']['cache_dir'];

0 commit comments

Comments
 (0)