Open Harmageddon opened 4 years ago
Please see #23235
@astridx Thank you, but I think that's a different issue. #23235 is about not properly detecting if curl is disabled in some cases. The issue here is that the alternative to curl doesn't work for core updates (after it has been properly detected that curl is not available). Other things that don't use redirects, like querying the update information, work fine.
Yes you are right: "different issue". I mainly linked #23235 because it is also about the question of whether we want to support "deactivated curl systems" at all.
Ah, I see. We currently do support other protocols than cURL and I think we should continue doing so.
Steps to reproduce the issue
CurlTransport::isSupported
(libraries/src/Http/Transport/CurlTransport.php
, line 296) to:Expected result
The update should work using the stream protocol.
Actual result
Update over the stream protocol fails.
An error has occurred.
Call stack
System information (as much as possible)
PHP Version 7.3.22 Web Server nginx/1.18.0 WebServer to PHP Interface fpm-fcgi
cURL disabled
Additional comments
The headers retrieved for the update package are as follows:
As you can see, we have two blocks there: One initiated with a 302 redirect status code, and one initiated with a 200 found status code.
In
CurlTransport::getResponse
, we have this section: https://github.com/joomla/joomla-cms/blob/e586555c9920b61b139ac9a113e48f5dc22ac2b4/libraries/src/Http/Transport/CurlTransport.php#L235-L272There, the case of having one or more redirects and thus, several header blocks, is covered. Can we just replicate this for
StreamTransport
? As I'm not an expert in this field, I'm hesitant to just creating a PR without knowing possible sideeffects.