From: David ‘Bombe’ Roden Date: Sun, 6 Jan 2013 15:00:40 +0000 (+0100) Subject: Don’t send Accept-Encoding header, send User-Agent instead. X-Git-Tag: 0.1~63 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=615e3ec264d5e8215daf21c589f5e40dcf6f98f8;p=rhynodge.git Don’t send Accept-Encoding header, send User-Agent instead. --- 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();