From fd506bda614ea6b5a0939eacb62897747d738db0 Mon Sep 17 00:00:00 2001 From: Albert Pham Date: Mon, 17 Feb 2014 19:02:45 -0800 Subject: [PATCH] Set a user agent for HTTP requests It is now "Mozilla/5.0 (Java) SKMCLauncher" --- src/main/java/com/skcraft/launcher/util/HttpRequest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/skcraft/launcher/util/HttpRequest.java b/src/main/java/com/skcraft/launcher/util/HttpRequest.java index d1238b4..cc23121 100644 --- a/src/main/java/com/skcraft/launcher/util/HttpRequest.java +++ b/src/main/java/com/skcraft/launcher/util/HttpRequest.java @@ -109,6 +109,7 @@ public class HttpRequest implements Closeable, ProgressObservable { } conn = (HttpURLConnection) reformat(url).openConnection(); + conn.setRequestProperty("User-Agent", "Mozilla/5.0 (Java) SKMCLauncher"); if (body != null) { conn.setRequestProperty("Content-Type", contentType);