Wikidata-Toolkit
Wikidata-Toolkit copied to clipboard
Follow HTTP redirects
The current code in WebResourceFetcher does not follow HTTP redirects. This causes problems, for example, if somebody uses an http-based URL http://www.wikidata.org/w/api.php to access the Wikidata API. This URL redirects to https://www.wikidata.org/w/api.php, but WDTK fails to follow this and encounters an error.
This is probably a minor issue since one can usually use the proper URL directly on Web requests, but it makes all online functions of WDTK somewhat less robust. The WebResourceFetcher should better check for redirects (and maybe for other types of non-200 responses) and act appropriately.
This has probably been solved by #507 but it would be worth double-checking.