Summary:ASTERISK-12130: Improve download links on Asterisk.org to allow wget/non-javascript browsers
Reporter:Eric Caron (ecaron)Labels:
Date Opened:2008-06-02 18:31:53Date Closed:2011-06-07 14:07:19
Versions:Frequency of
Environment:Attachments:( 0) astget.sh
Description:I understand that the Asterisk.org website wants to track downloads, but could the tracking method be implemented in such a way that it is transparent to the user?

Regardless of the site's language (PHP, Perl, Ruby), there are dozens of ways this could be done. For example, the URL could be handled using a mod_rewrite in Apache and cleaning the path from http://www.digium.com/elqNow/elqRedir.htm?ref=http://downloads.digium.com/pub/asterisk/releases/asterisk- to http://www.digium.com/downloads/asterisk/releases/asterisk- The handler could then record the download via whatever mechanism you want, and then seamlessly read in/out the file (like w/ PHP's readfile), or even through a 302-redirect to the full path.

I'd love to not mess up your statistics, because I understand how valuable they are, but I download all your builds straight to my headless box, and use wget/lynx/etc to grab the file. To give you the data I'd have to use Firefox, then SCP the build to the server - and my 1 download isn't worth enough to you to warrant that waste in my time, so I just grab the latter part of your URL and get the file that way - leaving me with a feeling of guilt about circumventing your desired method.

I'll gladly provide whatever code would be useful to you to help incorporate this method - just name the language you want.
Comments:By: Matt Riddell (zx81) 2008-06-02 22:05:01

I'd second this, quite often this has bugged me - mostly when grabbing the g729 and register programs as I actually check out Asterisk from svn.

By: Paul Belanger (pabelanger) 2008-06-02 22:24:34

+1 for me. Love to see this fixed.

By: Russell Bryant (russell) 2008-06-03 08:46:25

I'd love to see it fixed, too.  :)

This is the tool that the marketing department chose.  If someone can come up with a technical solution that still allows them to use this tool, but allows the links to work for wget, etc., then I will happily hand it over to them so that it can be implemented.

As far as the site goes, it runs on drupal, so most (all?) of the site is php.

By: Russell Bryant (russell) 2008-06-03 08:53:02

I've forwarded this issue over to the webmaster ...

By: Sean Bright (seanbright) 2008-06-03 12:12:31

Another option would be something like this:

<a href="asterisk-" onclick="location.href = 'elqRedir.htm?ref=http:%2F%2Fdownloads.digium.com%2Fpub%2Fasterisk%2Fasterisk-'; return false;">asterisk-</a>

And that would work for all browsers.  Javascript enabled ones would use the onclick handler, and non-javascript browsers or "Copy link location" functionality would copy the direct link rather than the tracker link.

(Pretend that < and > are the less-than and greater-than characters)

By: Eric Caron (ecaron) 2008-06-03 12:15:49

seanbright, right, but that'd be at the cost of marketing's metrics - and the solution should not be at the cost of losing those valuable numbers. I'm assuming that if the Digium servers are running Drupal, they're beefy enough to handle this accounting server-side without Javascript being required.

By: Tilghman Lesher (tilghman) 2008-06-20 18:25:28

As noted above, this is not under the control of the open source developers.  If you'd like to contact webmaster@digium.com, that would be the appropriate place to channel your concerns.  However, there is nothing that the open source programmers can do about this issue, so I'm afraid I'm going to have to close it.

By: Eric Caron (ecaron) 2008-07-29 15:59:20

My calls to the webmaster seem to be falling on deaf ears. I have a really hard time believing that nobody in Asterisk can't get an audience with the Digium webmaster to resolve this issue.

By: Tilghman Lesher (tilghman) 2008-07-29 16:09:49

The situation has not changed.  We cannot help you with this.

By: Sean Bright (seanbright) 2008-07-30 08:27:13

Not sure why the reaction to this request is as dismissive as it is, but the uploaded script is a simple work around for the problem.  Hope it helps!