Cannot download php source with ruby rest client
Description
I apologize if this is off base asking here but I am running out of ideas. We have a pipeline that runs ruby code that downloads php sources. It uses a ruby gem called rest-client. Recently we are getting:
RestClient.get "https://www.php.net/distributions/php-7.4.27.tar.gz", "Accept"=>"*/*", "User-Agent"=>"rest-client/2.1.0 (linux x86_64) ruby/3.1.1p18"
streaming GET https://www.php.net/distributions/php-7.4.27.tar.gz (16056 of unknown) [0 Content-Length]
streaming GET https://www.php.net/distributions/php-7.4.27.tar.gz (30522 of unknown) [0 Content-Length]
# => 503 ServiceUnavailable | text/html 30522 bytes, 0.51s
I tried to just run this RestClient::Request.execute(method: :get, url: 'https://www.php.net/distributions/php-7.4.27.tar.gz', raw_response: true, log: Logger.new(STDOUT)) in a ruby shell after requiring the client (require rest-client) and I get the same issue. I can no longer download the files and get a 503 every time and it has been this way for about a month.
Repro Steps:
gem install rest-clientirbrequire 'rest-client'RestClient::Request.execute(method: :get, url: 'https://www.php.net/distributions/php-7.4.27.tar.gz', raw_response: true, log: Logger.new(STDOUT))
I have tried to curl this URL directly and it works. The rest client has not changed for a long time so I am wondering if something has happened to php.net to cause this. I have tried rest client with other URLs to download zip files and they all work. There may be configurations in the rest client gem that I need to tweak but I cannot see any. Since this has worked well in the past, I am looking for any insight from your end as to why this could be happening. Appreciate the help!!
PHP Version
Any
Operating System
Attempted with MacOS 12.1 and Ubuntu 18.04
I assume this has the same underlying root cause as https://github.com/php/web-php/issues/506; see also https://github.com/php/web-php/issues/505#issuecomment-1076056925 for some more details.
I'm closing this ticket, since it is certainly not a php-src issue, and likely a duplicate of php/web-php#506.