I have an extension hosted on github, for which I want to provide automatic updates. However, when I provide the URL to a file attached to a release, Joomla just reports the following on trying to automatically update:
Fehler beim Verbindungsaufbau zum Server: Error Unknown
Ungültige Webadresse
Translation
Error in connecting to server: Error Unknown
Invalid web address
It's the same when trying to install from the web address via the Extensions - Install page. From the browser, I can download the file just fine however. Anybody got an idea why that is? Is it an error on github side, or on Joomla's? Or is it some "safety" or "security" mechanism on github side? What can I do to avoid it? Or do those two just not play along?
Example URL: https://github.com/codeling/bfstop/releases/download/1.2.0/pkg_bfstop-1.2.0.zip
Edit:
Inserted the patch for downloadPackage method (gist.github.com/piotr-cz/8316210) mentioned by piotr_cz in the comments below the answer into my Joomla installation now.
URL passed into the method after resolving the redirect: https://s3.amazonaws.com/github-cloud/releases/6794712/f2aa5eb4-7838-11e3-837a-c6be2639e4ca.zip?response-content-disposition=attachment%3B%20filename%3Dpkg_bfstop-1.2.0.zip&AWSAccessKeyId=AKIAISTNZFOVBIJMK3TQ&Expires=1389455424&Signature=Nnyl6TnWueTqK8bPkPXUidM8UzQ%3D
URL after the newly inserted lines: https://s3.amazonaws.com/github-cloud/releases/6794712/f2aa5eb4-7838-11e3-837a-c6be2639e4ca.zip?response-content-disposition=attachment; filename=pkg_bfstop-1.2.0.zip&AWSAccessKeyId=AKIAISTNZFOVBIJMK3TQ&Expires=1389455424&Signature=Nnyl6TnWueTqK8bPkPXUidM8UzQ=
The response is still a 505 error:
response: JHttpResponse Object
(
[code] => 505
[headers] => Array
(
[Date] => Sat, 11 Jan 2014 15:49:24 GMT
[Connection] => close
[Server] => AmazonS3
)
[body] =>
)
So I suppose the encoding doesn't matter. The error 505 would indeed indicate http version problems? Why would Joomla and Amazon disagree on HTTP versions? Definitely not an HTTP expert here but version 1.1 should be the unchanged standard version since more than 10 years now?