[php-src] Issue #8252: Cannot download php source with ruby rest client
| From: | xtreme-shane-lattanzio | Date: | Fri, 25 Mar 2022 18:25:30 +0000 |
| Subject: | [php-src] Issue #8252: Cannot download php source with ruby rest client | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-240499@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/8252
Author: xtreme-shane-lattanzio
### 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:
1. gem install rest-client
2. irb
3. require 'rest-client'
4. 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