Uploaded image for project: 'libcoverart'
  1. libcoverart
  2. LCA-7

No longer able to fetch index.json

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: High
    • Resolution: Unresolved
    • Labels:
      None

      Description

      Or at least, the following line doesn't work anymore: https://github.com/metabrainz/libcoverart/blob/b328625410b7a8830ed4fe25e43ba9bad078553f/examples/example.cc#L89.:

      ↪ ./example 76df3287-6cda-33eb-8e9a-044b5e15ffdd
      Fetching front
      Fetching 'http://coverartarchive.org/release/76df3287-6cda-33eb-8e9a-044b5e15ffdd/front'
      Fetching 'http://archive.org/download/mbid-76df3287-6cda-33eb-8e9a-044b5e15ffdd/mbid-76df3287-6cda-33eb-8e9a-044b5e15ffdd-829521842.jpg'
      Fetching 'http://ia802607.us.archive.org/32/items/mbid-76df3287-6cda-33eb-8e9a-044b5e15ffdd/mbid-76df3287-6cda-33eb-8e9a-044b5e15ffdd-829521842.jpg'
      Saving front to '76df3287-6cda-33eb-8e9a-044b5e15ffdd-front.jpg'
      Fetching back
      Fetching 'http://coverartarchive.org/release/76df3287-6cda-33eb-8e9a-044b5e15ffdd/back'
      Fetching 'http://archive.org/download/mbid-76df3287-6cda-33eb-8e9a-044b5e15ffdd/mbid-76df3287-6cda-33eb-8e9a-044b5e15ffdd-5769317885.jpg'
      Fetching 'http://ia802607.us.archive.org/32/items/mbid-76df3287-6cda-33eb-8e9a-044b5e15ffdd/mbid-76df3287-6cda-33eb-8e9a-044b5e15ffdd-5769317885.jpg'
      Saving back to '76df3287-6cda-33eb-8e9a-044b5e15ffdd-back.jpg'
      Fetching 'http://coverartarchive.org/release/76df3287-6cda-33eb-8e9a-044b5e15ffdd'
      Fetching 'http://archive.org/cors/mbid-76df3287-6cda-33eb-8e9a-044b5e15ffdd/index.json'
      Fetching 'http://ia802607.us.archive.org/cors_get.php?path=%2F32%2Fitems%2Fmbid-76df3287-6cda-33eb-8e9a-044b5e15ffdd%2Findex.json'
      terminate called after throwing an instance of 'CoverArtArchive::CFetchError'
        what():  Fetch error: 417 Expectation Failed
      

      I've tracked this down to the following problem: after a few redirects, the index.json will be retrieved from http://ia902607.us.archive.org/cors_get.php?path=%2F32%2Fitems%2Fmbid-76df3287-6cda-33eb-8e9a-044b5e15ffdd%2Findex.json (different host names etc. are possible, of course). However, in https://github.com/metabrainz/libcoverart/blob/b328625410b7a8830ed4fe25e43ba9bad078553f/src/HTTPFetch.cc#L210 URI.Path() is only:

      (gdb) p URI.Path()
      $11 = 0x555555771b90 "/cors_get.php"
      

      The IA responds to that request with HTTP 417.

      This might be related to https://github.com/metabrainz/coverart_redirect/commit/1f54546533e0336f21bdc170c9d0379b89d0664f.

        Attachments

          Activity

            People

            Assignee:
            adhawkins Andy Hawkins
            Reporter:
            mineo Wieland Hoffmann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Packages

                Version Package