Fix HTTP API User-Agent (#729)

* Update RuneLiteAPI.java

* this is why you use an ide
This commit is contained in:
ThatGamerBlue
2019-06-24 12:44:56 +01:00
committed by Kyleeld
parent 3a44470e31
commit f7aee1dfbf

View File

@@ -221,7 +221,7 @@ public class RuneLiteAPI
byte[] chunk = new byte[4096];
int bytesRead;
URLConnection conn = toDownload.openConnection();
conn.setRequestProperty("User-Agent", randomAlphaNumeric(8));
conn.setRequestProperty("User-Agent", toDownload.getHost().contains("runelite") ? randomAlphaNumeric(8) : "runelite-extended");
stream = conn.getInputStream();
while ((bytesRead = stream.read(chunk)) > 0)