itchio / itch.io

:bug: Public itch.io issues tracker and documentation - use support instead for private information!
https://itch.io/support
239 stars 25 forks source link

Mark external downloads as external in the API #307

Open fasterthanlime opened 8 years ago

fasterthanlime commented 8 years ago

They need to be handled differently by the app.

For example, 'internal' downloads are guaranteed to increase in upload_id if their contents changes.

For external downloads, not so much - it could change URL, or what that URL points to could be changed, so we'll probably have to work with If-Modified-Since and ETag - but we'll probably see a regression to https://github.com/itchio/itch/issues/221 for external uploads.

Need to think about this more.

leafo commented 8 years ago

hmm, there are a lot of unknowns here, since we can't guarantee the server that has the files will have the correct headers. The simple fix would be to hash the url, and assume that what it's pointing to never changes, but I can definitely imagine people setting the URL once and then replacing the file on their end.

I also thing that having the apps ping the remote servers probably isn't the nicest behavior, it might send a large amount of requests that they didn't intend

fasterthanlime commented 8 years ago

but I can definitely imagine people setting the URL once and then replacing the file on their end.

We could add a hard constraint for that. It's not like it's costly for them to update the external URLs on the game page (don't have to wait for the upload), it seems like a reasonable constraint for us to enforce.

Along with a FAQ entry "The app doesn't seem to download updates for my game, what do?"