Try to update extension that provides a downloadurl that is a link to a Github zipball.
Extension should be updated in a normal manner.
Error message:
Error connecting to the server: No HTTP response code found.
Joomla 3.6.5
PHP Version 5.6.29
Web Server Apache
cURL Information 7.45.0
Failure is due to Github not receiving any user_agent.
Labels |
Added:
?
|
My use case might be a bit unique. I use a php script to generate the update.xml based on the releases that are at Github (via api.github.com). This would be a sample of that output. The links are via api.github.com and that may be the reason that Github is requiring the user_agent. I suppose I could interpolate the links given by the api into /archive/ varieties as in your example.
Regardless of any of that, it would seem appropriate that using a fopen() stream should have use of a user_agent just as is being done for curl,etc. by use of ini_set('user_agent', {Installer}).
Generally the API gives responses to the non-api.github.com
resources, so you should be able to use those. I'd definitely consider it best practice to not use the API subdomain unless you're explicitly intending for the consumers of that update.xml
file to ping the API versus make a "normal" request.
And I'd say we should be setting the user agent through the HTTP adapter for this case instead of changing the global PHP configuration. Even worse here is that the change isn't being reverted so we're changing the global configuration in a way that causes side effects for the rest of the process' lifetime.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-01-13 16:37:04 |
Closed_By | ⇒ | ron4mac |
@ron4mac can you please provide an url as example? My own extension is using GitHub as update server and I don't have problems at all. My update urls looks like this
https://github.com/n9iels/mod_jversions/archive/V2.0.1.zip
(it is connected to a Release)