Updating from Sourceforge

Asked by Kevin Mess

I'm working with a project hosted on Sourceforge. When downloading applications through a web browser, Sourceforge redirects once or twice to the actual file location. While cumbersome, this redirection appears to serve at least one vital function - maintaining download statistics. While I have located the actual download URL to use with Sparkle, the download statistics are not getting updated when used directly.

I'd like to have Sparkle work seamlessly for the user, download the update, and allow Sourceforge to update the download statistics. Alternatively, I'd like to notify the user that an update is available, NOT download and install the update, but rather provide a link to the download page. In other words, the download statistics are important.

Any ideas? And while I'm certainly not the first to say thanks for such a great framework, "Thank you!"

Kevin

Question information

Language:
English Edit question
Status:
Answered
For:
Sparkle Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Andy Matuschak (andymatuschak) said :
#1

Hm, tricky! They use META redirects and don't send the correct HTTP redirection codes in response to the page loads.

You could add something to the downloading code which checked the MIME type of the response, and if it's text/html, parse it with an NSXMLDocument, and check the HEAD section for a META redirect tag…

Just giving the user a link to the download page would be an awful experience: are your stats really more important than your users' ease of use?

Alternately, I bet there are other free places you could host your download which draw their stats from their webserver rather than from a redirection script, so you could directly link. It would be easy enough to do, anyway. Google Code? Github? Bitbucket?

Revision history for this message
Hofman (cmhofman) said :
#2

Are you sure you;re doing things correctly? I am also developing for projects hosted on SourceForge, and have no problems with this issue, statistics are also updated. We use a URL of the form http://downloads.sourceforge.net/<project>/<filename>, NSURLDownload used by Sparkle has no problem with the redirections it gets.

Can you help with this problem?

Provide an answer of your own, or ask Kevin Mess for more information if necessary.

To post a message you must log in.