From: Marius Gavrilescu Date: Mon, 29 Jul 2013 08:29:37 +0000 (+0300) Subject: Do not "fix" HTTP message when not broken X-Git-Tag: 0.000_001~17 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=5b5c357e7016b028883e03f7a38f0efd9bbfb7b9;p=fonbot.git Do not "fix" HTTP message when not broken --- 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); }