Skip to content

Try a different url for IIIF images with weird formats

The Image.perform_check method uses urljoin to build the info.json. This is perfectly fine, except when we encounter weird IIIF server that use query strings.

The method should try 2 urls to get the IIIF payload:

  1. the current one, with urljoin
  2. a second one, using .format to append info.json without url analysis

The algorithm would then become:

  1. build both urls, store them in a set (thus avoiding duplicate requests)
  2. try all urls in the set
  3. break on the first success
  4. if no query result in a 200, raise same exception

See https://gitlab.com/arkindex/requests/-/issues/304 for details