Fix images download from magiccards.info

This commit is contained in:
Quercitron 2016-02-09 01:38:56 +03:00
parent 9221e4eb64
commit d139cd591c

View file

@ -571,6 +571,8 @@ public class DownloadPictures extends DefaultBoundedRangeModel implements Runnab
// Logger.getLogger(this.getClass()).info(url.toString());
URLConnection httpConn = url.openConnection(p);
// images download from magiccards.info may not work with default 'User-Agent: Java/1.x.x' request header
httpConn.setRequestProperty("User-Agent", "");
httpConn.connect();
int responseCode = ((HttpURLConnection) httpConn).getResponseCode();
if (responseCode == 200) {