+ Reply to Thread
Results 1 to 7 of 7

Thread: Discoveries XML files

  1. #1
    Soulwalker
    Join Date
    Feb 2011
    Posts
    8

    Default Discoveries XML files

    Just wondering if there were plans to update the discoveries xml files that are available on the ftp site. That zip file hasn't been updated since early May.

    Thanks

  2. #2

  3. #3
    Soulwalker
    Join Date
    Feb 2011
    Posts
    8

    Default

    Cool, thanks!

  4. #4
    Rift Disciple
    Join Date
    Oct 2014
    Posts
    162

    Default

    Meh. So I'll have to exchange the earlier FTP download code with a HTTP version... but thank you, as well!

  5. #5
    Rift Disciple
    Join Date
    Oct 2014
    Posts
    162

    Question Download error 404

    Interesting issue today:

    The directory index contains a link to Rift_Discoveries_2016-1-29.zip. But trying to download this results in a
    Not Found

    The requested URL /addons/assets/Rift_Discoveries_2016-1-29.zip was not found on this server.
    Is the index generated independently of the real content of the directory?

  6. #6
    Rift Disciple
    Join Date
    Oct 2014
    Posts
    162

    Default

    OK, now there is a Rift_Discoveries_2016-2-1.zip in my browser. But when I tried to process it with a conversion script, it still reported that Rift_Discoveries_2016-1-29.zip was not found.

    There seems to be a load balance system offering one out of several true download locations, but they are out of sync.

  7. #7
    Ascendant forbiddenlake's Avatar
    Join Date
    Jun 2013
    Posts
    5,719

    Default

    Quote Originally Posted by LigH View Post
    Is the index generated independently of the real content of the directory?
    It appears so. It happens occasionally, but they do catch up.
    If you want to trade unreliability for a few extra calls, then instead of trusting the index, you can issue HTTP HEADs (e.g. curl -I http://blah/foo/bar) on known URLs until you get a 200 OK. The "known URL" includes a date between today's and the one listed on the index, inclusive. Date format looks like "%Y-%-m-%-d". Once you've found a live copy, you can issue an HTTP GET (wget/curl/...).

    Some fanciness I just made up:
    Code:
    $ date "+%Y-%-m-%-d"
    2016-2-2
    $ date "+%Y-%-m-%-d" -d "1 day ago"
    2016-2-1
    $ curl -sI http://webcdn.triongames.com/addons/assets/Rift_Discoveries_$(date "+%Y-%-m-%-d").zip | head -n 1
    HTTP/1.1 404 Not Found
    $ curl -sI http://webcdn.triongames.com/addons/assets/Rift_Discoveries_$(date "+%Y-%-m-%-d" -d "1 day ago").zip | head -n 1
    HTTP/1.1 200 OK
    $ curl -Os http://webcdn.triongames.com/addons/assets/Rift_Discoveries_$(date "+%Y-%-m-%-d" -d "1 day ago").zip
    # downloading here
    Last edited by forbiddenlake; 02-02-2016 at 06:30 AM.

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts