Commit e29011548ca9047c8acc0ccca8c35c8a3d4a9ba8
1 parent
6439d9f6
Exists in
master
verificar se a url a ser avaliada contém o protocolo http.
Showing
1 changed file
with
4 additions
and
0 deletions
Show diff stats
Desenvolvimento/Codificacao/e-Selo/src/main/java/br/com/eselo/controller/AvaliacaoController.java
@@ -588,6 +588,10 @@ public class AvaliacaoController { | @@ -588,6 +588,10 @@ public class AvaliacaoController { | ||
588 | WebChecker.PostParams postParams = WebChecker.from(urlServico) | 588 | WebChecker.PostParams postParams = WebChecker.from(urlServico) |
589 | .withPostRequest(); | 589 | .withPostRequest(); |
590 | 590 | ||
591 | + if(!url.substring(0,4).equalsIgnoreCase("http")) | ||
592 | + { | ||
593 | + url = "http://" + url; | ||
594 | + } | ||
591 | postParams.addParam("url", url); | 595 | postParams.addParam("url", url); |
592 | Gson g = new GsonBuilder().create(); | 596 | Gson g = new GsonBuilder().create(); |
593 | urlAvaliada = g.fromJson(postParams.execute().getContent(), | 597 | urlAvaliada = g.fromJson(postParams.execute().getContent(), |