mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
Clear the user agent when downloading card images.
This commit is contained in:
@@ -141,7 +141,9 @@ public class ImageFetcher {
|
||||
private void doFetch(String urlToDownload) throws IOException {
|
||||
URL url = new URL(urlToDownload);
|
||||
System.out.println("Attempting to fetch: " + url);
|
||||
BufferedImage image = ImageIO.read(url.openStream());
|
||||
java.net.URLConnection c = url.openConnection();
|
||||
c.setRequestProperty("User-Agent", "");
|
||||
BufferedImage image = ImageIO.read(c.getInputStream());
|
||||
// First, save to a temporary file so that nothing tries to read
|
||||
// a partial download.
|
||||
File destFile = new File(destPath + ".tmp");
|
||||
|
||||
Reference in New Issue
Block a user