Wikidata-Toolkit icon indicating copy to clipboard operation
Wikidata-Toolkit copied to clipboard

Follow HTTP redirects

Open mkroetzsch opened this issue 10 years ago • 1 comments

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.

mkroetzsch avatar Jun 28 '15 08:06 mkroetzsch

This has probably been solved by #507 but it would be worth double-checking.

wetneb avatar Sep 19 '20 18:09 wetneb