Rewrite WU requests and cookie handling

This commit is contained in:
2023-10-21 02:34:51 +02:00
parent 8959eb14a4
commit 3855dc9ac4
8 changed files with 93 additions and 50 deletions

12
get.php
View File

@ -395,8 +395,16 @@ function uupGetOnlineFiles($updateId, $rev, $info, $cacheRequests, $type) {
} else {
$fetchTime = time();
consoleLogger('Fetching information from the server...');
$postData = composeFileGetRequest($updateId, uupDevice(), $info, $rev, $type);
$out = sendWuPostRequest('https://fe3cr.delivery.mp.microsoft.com/ClientWebService/client.asmx/secured', $postData);
$composerArgs = [$updateId, $info, $rev, $type];
$out = sendWuPostRequestHelper('clientSecured', 'composeFileGetRequest', $composerArgs);
if($out['error'] != 200) {
consoleLogger('The request has failed');
return array('error' => 'WU_REQUEST_FAILED');
}
$out = $out['out'];
consoleLogger('Information has been successfully fetched.');
}