From 615e3ec264d5e8215daf21c589f5e40dcf6f98f8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sun, 6 Jan 2013 16:00:40 +0100 Subject: [PATCH] =?utf8?q?Don=E2=80=99t=20send=20Accept-Encoding=20header,?= =?utf8?q?=20send=20User-Agent=20instead.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/net/pterodactylus/reactor/queries/HttpQuery.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/pterodactylus/reactor/queries/HttpQuery.java b/src/main/java/net/pterodactylus/reactor/queries/HttpQuery.java index c514084..2cec118 100644 --- a/src/main/java/net/pterodactylus/reactor/queries/HttpQuery.java +++ b/src/main/java/net/pterodactylus/reactor/queries/HttpQuery.java @@ -72,7 +72,7 @@ public class HttpQuery implements Query { InputStreamReader inputStreamReader = null; try { /* make request. */ - get.addHeader("Accept-Encoding", "identity"); + get.addHeader("User-Agent", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.11 (KHTML, like Gecko) Ubuntu/12.04 Chromium/20.0.1132.47 Chrome/20.0.1132.47 Safari/536.11"); HttpResponse response = httpClient.execute(get); if (response.getStatusLine().getStatusCode() != HttpStatus.SC_OK) { return new FailedState(); -- 2.7.4