mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 20:28:31 +00:00
Merge 'minor-next' into 'major-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/14233077278
This commit is contained in:
commit
ad95f392c1
@ -25,7 +25,6 @@ namespace pocketmine\utils;
|
|||||||
|
|
||||||
use pocketmine\VersionInfo;
|
use pocketmine\VersionInfo;
|
||||||
use function array_merge;
|
use function array_merge;
|
||||||
use function curl_close;
|
|
||||||
use function curl_error;
|
use function curl_error;
|
||||||
use function curl_exec;
|
use function curl_exec;
|
||||||
use function curl_getinfo;
|
use function curl_getinfo;
|
||||||
@ -217,7 +216,6 @@ class Internet{
|
|||||||
CURLOPT_HTTPHEADER => array_merge(["User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0 " . VersionInfo::NAME . "/" . VersionInfo::VERSION()->getFullVersion(true)], $extraHeaders),
|
CURLOPT_HTTPHEADER => array_merge(["User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0 " . VersionInfo::NAME . "/" . VersionInfo::VERSION()->getFullVersion(true)], $extraHeaders),
|
||||||
CURLOPT_HEADER => true
|
CURLOPT_HEADER => true
|
||||||
]);
|
]);
|
||||||
try{
|
|
||||||
$raw = curl_exec($ch);
|
$raw = curl_exec($ch);
|
||||||
if($raw === false){
|
if($raw === false){
|
||||||
throw new InternetException(curl_error($ch));
|
throw new InternetException(curl_error($ch));
|
||||||
@ -243,8 +241,5 @@ class Internet{
|
|||||||
$onSuccess($ch);
|
$onSuccess($ch);
|
||||||
}
|
}
|
||||||
return new InternetRequestResult($headers, $body, $httpCode);
|
return new InternetRequestResult($headers, $body, $httpCode);
|
||||||
}finally{
|
|
||||||
curl_close($ch);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user