Skip to content

Commit

Permalink
fix weird http code (#552)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrAdhit authored Jan 5, 2024
1 parent 78a0798 commit cd057d8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions run.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,8 @@ function downloadSp() {

try {
if ($curl_check) {
$stcode = curl.exe -s -w "%{http_code}" -o /dev/null $web_Url --retry 2 --ssl-no-revoke
if ($stcode -ne "200") {
$stcode = curl.exe -Is -w "%{http_code} \n" -o /dev/null $web_Url --retry 2 --ssl-no-revoke
if ($stcode.trim() -ne "200") {
Write-Host "Curl error code: $stcode"; throw
}
curl.exe -q $web_Url -o $local_Url --progress-bar --retry 3 --ssl-no-revoke
Expand All @@ -462,8 +462,8 @@ function downloadSp() {
try {

if ($curl_check) {
$stcode = curl.exe -s -w "%{http_code}" -o /dev/null $web_Url --retry 2 --ssl-no-revoke
if ($stcode -ne "200") {
$stcode = curl.exe -Is -w "%{http_code} \n" -o /dev/null $web_Url --retry 2 --ssl-no-revoke
if ($stcode.trim() -ne "200") {
Write-Host "Curl error code: $stcode"; throw
}
curl.exe -q $web_Url -o $local_Url --progress-bar --retry 3 --ssl-no-revoke
Expand Down

0 comments on commit cd057d8

Please sign in to comment.