MediaWiki offers the HttpRequestFactory class to make HTTP calls in a standardised manner. The class ensures MediaWiki's internal logging features (e.g. 'http' log channel) and configurations settings (e.g. http_proxy) are used upon executing HTTP calls. Instead, RottenLinks uses the curl_ functions directly.
Example code (untested!):
$request = MediaWikiServices::getInstance()->getHttpRequestFactory()->create( $url, [ 'method' => 'HEAD', // return headers only 'timeout' => $config->get( 'RottenLinksCurlTimeout' ), 'userAgent' => 'RottenLinks, MediaWiki extension (https://github.com/miraheze/RottenLinks), running on ' . $config->get( 'Server' ) ], __METHOD__ )->execute(); return (int)$request->getStatus();