Reject 5xx codes in server reachability check

dev
gravel 8 months ago
parent 067eefecb2
commit 8f04763fb8
Signed by: gravel
GPG Key ID: C0538F3C906B308F

@ -1293,8 +1293,8 @@
->set_response_filter(function (CurlHandle $handle) {
$code = curl_getinfo($handle, CURLINFO_RESPONSE_CODE);
$url = curl_getinfo($handle, CURLINFO_EFFECTIVE_URL);
log_debug("Got $code for $url in custom filter.");
return $code != 0;
log_debug("Got $code for $url in reachability filter.");
return $code != 0 || (500 <= $code && $code <= 599);
})
->retryable(retries: $FAST_FETCH_MODE ? 2 : 4)
->downgradeable($did_downgrade)

Loading…
Cancel
Save