From 560d9338b38c2e4f8724f66c92caffa75a1e5d41 Mon Sep 17 00:00:00 2001 From: jomo Date: Mon, 23 Nov 2015 04:29:33 +0100 Subject: [PATCH] needs more Potato, fixes #71 --- src/main/java/org/drtshock/Potato.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/org/drtshock/Potato.java b/src/main/java/org/drtshock/Potato.java index 6c53aea..81e02f4 100644 --- a/src/main/java/org/drtshock/Potato.java +++ b/src/main/java/org/drtshock/Potato.java @@ -79,6 +79,7 @@ public class Potato implements Tuber { final URL url = new URL("https://www.google.com/search?q=potato"); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("GET"); + connection.addRequestProperty("User-Agent", "Potato"); connection.connect(); int inOven = connection.getResponseCode(); return inOven == 200;