Commit 9f81c2f57e33c6019ea358fc80ed2c9404a174fa
1 parent
e53fcb4d
Exists in
master
and in
1 other branch
Adição do "metodoRequisicaoGET.setRequestHeader("user-agent",
"NewUseAgent/1.0");"
Showing
2 changed files
with
2 additions
and
0 deletions
Show diff stats
src/main/java/br/com/checker/emag/core/ContentEvaluation.java
... | ... | @@ -513,6 +513,7 @@ public class ContentEvaluation extends Evaluation { |
513 | 513 | |
514 | 514 | metodoRequisicaoGET = new GetMethod(UrlConvertida.toExternalForm());//URLEncoder.encode(UrlConvertida.toExternalForm(), "UTF-8")); |
515 | 515 | |
516 | + metodoRequisicaoGET.setRequestHeader("user-agent", "NewUseAgent/1.0"); | |
516 | 517 | metodoRequisicaoGET.setRequestHeader("http.agent", "Jakarta Commons-HttpClient/3.1"); |
517 | 518 | metodoRequisicaoGET.setFollowRedirects(true); |
518 | 519 | ... | ... |
src/main/java/br/com/checker/emag/util/WebAgent.java
... | ... | @@ -42,6 +42,7 @@ public class WebAgent { |
42 | 42 | public WebAgent withGetRequest() { |
43 | 43 | this.method = new GetMethod(this.url); |
44 | 44 | //this.method.setRequestHeader("user-agent", "Mozilla/5.0"); |
45 | + this.method.setRequestHeader("user-agent", "NewUseAgent/1.0"); | |
45 | 46 | this.method.setRequestHeader("http.agent", "Jakarta Commons-HttpClient/3.1"); |
46 | 47 | this.method.setFollowRedirects(true); |
47 | 48 | return this; | ... | ... |