From 5b5c357e7016b028883e03f7a38f0efd9bbfb7b9 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Mon, 29 Jul 2013 11:29:37 +0300 Subject: [PATCH] Do not "fix" HTTP message when not broken --- src/ro/ieval/fonbot/HttpCallExecutableRunnable.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ro/ieval/fonbot/HttpCallExecutableRunnable.java b/src/ro/ieval/fonbot/HttpCallExecutableRunnable.java index a513ed6..541a673 100644 --- a/src/ro/ieval/fonbot/HttpCallExecutableRunnable.java +++ b/src/ro/ieval/fonbot/HttpCallExecutableRunnable.java @@ -163,7 +163,7 @@ public final class HttpCallExecutableRunnable extends ExecutableRunnable{ else if(message != null && callback != null){ if(message.charAt(message.length()-1) == ')')//message is (something) message=message.substring(1, message.length()-1); - else + else if(message.charAt(0) == '(')//message is (something) something else message=message.substring(message.indexOf(')')+2); callback.onResult(conn.getResponseCode(), message, conn.getResponseCode() == 200 ? conn.getInputStream() : null); } -- 2.39.2