make mulitcurl follow redirects

This commit is contained in:
squidbear
2025-03-31 08:56:41 +02:00
parent 69454c7e27
commit 4c7560053d

View File

@@ -42,7 +42,7 @@ if [ $? -eq 0 ]; then
sleep 3 # to give the reference node more time to import the block if it is very current sleep 3 # to give the reference node more time to import the block if it is very current
http_status_code2=$($BASEPATH/multicurl.sh --ipv4 -m $timeout -s -X POST -w "%{http_code}" -o "$response_file2" -H "Content-Type: application/json" --data "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockByNumber\",\"params\":[\"$latest_block_number\", false],\"id\":1}" $ref) http_status_code2=$($BASEPATH/multicurl.sh -L --ipv4 -m $timeout -s -X POST -w "%{http_code}" -o "$response_file2" -H "Content-Type: application/json" --data "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockByNumber\",\"params\":[\"$latest_block_number\", false],\"id\":1}" $ref)
curl_code2=$? curl_code2=$?
@@ -57,7 +57,7 @@ if [ $? -eq 0 ]; then
response_file3=$(mktemp) response_file3=$(mktemp)
status_file3=$(mktemp) status_file3=$(mktemp)
{ {
$BASEPATH/multicurl.sh --ipv4 -m $timeout -s -X POST -w "%{http_code} %{time_total}" -o "$response_file3" -H "Content-Type: application/json" --data "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockByNumber\",\"params\":[\"latest\", false],\"id\":1}" $ref > "$status_file3" $BASEPATH/multicurl.sh -L --ipv4 -m $timeout -s -X POST -w "%{http_code} %{time_total}" -o "$response_file3" -H "Content-Type: application/json" --data "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockByNumber\",\"params\":[\"latest\", false],\"id\":1}" $ref > "$status_file3"
} & } &
pid3=$! pid3=$!