@@ -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 ' ]);
0 commit comments