I'm trying to implement a OAuth2 security in my mobile app back-end side based on this example.
The example uses springBootVersion = '1.0.2.RELEASE'. In my project I'm using 1.1.7.RELEASE. After having several inexplicable 400 - Bad Requests, I started pairing the dependencies.
So when I set the example spring boot version equal to mine, it stop compiling. Specifically the methods between **.** cannot be found.
// This method configures the OAuth scopes required by clients to access
// all of the paths in the video service.
#Override
public void configure(HttpSecurity http) throws Exception {
http.**csrf**().disable();
http
.**authorizeRequests**()
.antMatchers("/oauth/token").anonymous();
http
.**authorizeRequests**()
.antMatchers(HttpMethod.GET, "/**")
.access("#oauth2.hasScope('read')");
http
.**authorizeRequests**()
.antMatchers("/**")
.access("#oauth2.hasScope('write')");
}
}
I believe the relevant gradle dependencies to the security in the application are:
compile("org.springframework.boot:spring-boot-starter-security:${springBootVersion}")
compile("org.springframework.security.oauth:spring-security-oauth2:2.0.0.RC2")
compile("org.springframework.security.oauth:spring-security-oauth2-javaconfig:1.0.0.M1")
These are the original ones found in the example. Interesting, however, is that in my application I never get compiling erros, but it also does not work. My test cases running with the example application up run fine.
I'm really confused here. Should I change any of those dependencies? Thanks in advance for any support.
EDIT
Simple greeting controller:
public interface GreetingSvcApi {
public static final String GREETING_PATH = "/greeting";
#GET(GREETING_PATH)
public Greeting greeting(#Query("name") String name);
}
#Controller
public class GreetingController {
#RequestMapping(value = GreetingSvcApi.GREETING_PATH, method = RequestMethod.GET)
public
#ResponseBody
Greeting greeting(#RequestParam(value = "name", required = false, defaultValue = "Hello Developer") String name) {
return new Greeting(name);
}
}
public class GreetingControllerTest extends TestCase {
private final String USERNAME = "admin";
private final String PASSWORD = "pass";
private final String CLIENT_ID = "mobile";
private final String READ_ONLY_CLIENT_ID = "mobileReader";
private GreetingSvcApi greetingService = new SecuredRestBuilder()
.setLoginEndpoint(RestDataFixture.SERVER_HTTPS + BaseServiceApi.TOKEN_PATH)
.setUsername(USERNAME)
.setPassword(PASSWORD)
.setClientId(CLIENT_ID)
.setClient(new ApacheClient(UnsafeHttpsClient.createUnsafeClient()))
.setEndpoint(RestDataFixture.SERVER_HTTPS).setLogLevel(RestAdapter.LogLevel.FULL).build()
.create(GreetingSvcApi.class);
public void testGreetingInHttp() throws Exception {
Greeting greeting = greetingService.greeting("Greeting");
assertEquals(greeting.getPerson(), "Greeting");
}
}
Expected output:
o.a.h.c.protocol.RequestAddCookies - CookieSpec selected: best-match
o.a.h.c.protocol.RequestAuthCache - Auth cache not set in the context
o.a.h.i.c.PoolingHttpClientConnectionManager - Connection request: [route: {s}->https://localhost:8443][total kept alive: 0; route allocated: 0 of 2; total allocated: 0 of 20]
o.a.h.i.c.PoolingHttpClientConnectionManager - Connection leased: [id: 0][route: {s}->https://localhost:8443][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
o.a.h.impl.execchain.MainClientExec - Opening connection {s}->https://localhost:8443
o.a.h.i.c.HttpClientConnectionOperator - Connecting to localhost/127.0.0.1:8443
o.a.h.i.c.HttpClientConnectionOperator - Connection established 127.0.0.1:57518<->127.0.0.1:8443
o.a.h.impl.execchain.MainClientExec - Executing request POST /oauth/token HTTP/1.1
o.a.h.impl.execchain.MainClientExec - Proxy auth state: UNCHALLENGED
org.apache.http.headers - http-outgoing-0 >> POST /oauth/token HTTP/1.1
org.apache.http.headers - http-outgoing-0 >> Authorization: Basic bW9iaWxlOg==
org.apache.http.headers - http-outgoing-0 >> Content-Length: 80
org.apache.http.headers - http-outgoing-0 >> Content-Type: application/x-www-form-urlencoded; charset=UTF-8
org.apache.http.headers - http-outgoing-0 >> Host: localhost:8443
org.apache.http.headers - http-outgoing-0 >> Connection: Keep-Alive
org.apache.http.headers - http-outgoing-0 >> User-Agent: Apache-HttpClient/4.3.4 (java 1.5)
org.apache.http.headers - http-outgoing-0 >> Accept-Encoding: gzip,deflate
org.apache.http.wire - http-outgoing-0 >> "POST /oauth/token HTTP/1.1[\r][\n]"
org.apache.http.wire - http-outgoing-0 >> "Authorization: Basic bW9iaWxlOg==[\r][\n]"
org.apache.http.wire - http-outgoing-0 >> "Content-Length: 80[\r][\n]"
org.apache.http.wire - http-outgoing-0 >> "Content-Type: application/x-www-form-urlencoded; charset=UTF-8[\r][\n]"
org.apache.http.wire - http-outgoing-0 >> "Host: localhost:8443[\r][\n]"
org.apache.http.wire - http-outgoing-0 >> "Connection: Keep-Alive[\r][\n]"
org.apache.http.wire - http-outgoing-0 >> "User-Agent: Apache-HttpClient/4.3.4 (java 1.5)[\r][\n]"
org.apache.http.wire - http-outgoing-0 >> "Accept-Encoding: gzip,deflate[\r][\n]"
org.apache.http.wire - http-outgoing-0 >> "[\r][\n]"
org.apache.http.wire - http-outgoing-0 >> "username=admin&password=pass&client_id=mobile&client_secret=&grant_type=password"
org.apache.http.wire - http-outgoing-0 << "HTTP/1.1 200 OK[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "Server: Apache-Coyote/1.1[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "X-Content-Type-Options: nosniff[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "X-XSS-Protection: 1; mode=block[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "Cache-Control: no-cache, no-store, max-age=0, must-revalidate[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "Pragma: no-cache[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "Expires: 0[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "Strict-Transport-Security: max-age=31536000 ; includeSubDomains[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "X-Frame-Options: DENY[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "X-Application-Context: application[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "Cache-Control: no-store[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "Pragma: no-cache[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "Content-Type: application/hal+json[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "Transfer-Encoding: chunked[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "Date: Fri, 31 Oct 2014 19:03:42 GMT[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "75[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "{"access_token":"1a59e04c-afb0-40cd-9e17-4e573beea347","token_type":"bearer","expires_in":43199,"scope":"read write"}[\r][\n]"
org.apache.http.headers - http-outgoing-0 << HTTP/1.1 200 OK
org.apache.http.headers - http-outgoing-0 << Server: Apache-Coyote/1.1
org.apache.http.headers - http-outgoing-0 << X-Content-Type-Options: nosniff
org.apache.http.headers - http-outgoing-0 << X-XSS-Protection: 1; mode=block
org.apache.http.headers - http-outgoing-0 << Cache-Control: no-cache, no-store, max-age=0, must-revalidate
org.apache.http.headers - http-outgoing-0 << Pragma: no-cache
org.apache.http.headers - http-outgoing-0 << Expires: 0
org.apache.http.headers - http-outgoing-0 << Strict-Transport-Security: max-age=31536000 ; includeSubDomains
org.apache.http.headers - http-outgoing-0 << X-Frame-Options: DENY
org.apache.http.headers - http-outgoing-0 << X-Application-Context: application
org.apache.http.headers - http-outgoing-0 << Cache-Control: no-store
org.apache.http.headers - http-outgoing-0 << Pragma: no-cache
org.apache.http.headers - http-outgoing-0 << Content-Type: application/hal+json
org.apache.http.headers - http-outgoing-0 << Transfer-Encoding: chunked
org.apache.http.headers - http-outgoing-0 << Date: Fri, 31 Oct 2014 19:03:42 GMT
o.a.h.impl.execchain.MainClientExec - Connection can be kept alive indefinitely
org.apache.http.wire - http-outgoing-0 << "0[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "[\r][\n]"
o.a.h.i.c.PoolingHttpClientConnectionManager - Connection [id: 0][route: {s}->https://localhost:8443] can be kept alive indefinitely
o.a.h.i.c.PoolingHttpClientConnectionManager - Connection released: [id: 0][route: {s}->https://localhost:8443][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
---> HTTP GET https://localhost:8443/greeting?name=Greeting
Authorization: Bearer 1a59e04c-afb0-40cd-9e17-4e573beea347
---> END HTTP (no body)
o.a.h.c.protocol.RequestAddCookies - CookieSpec selected: best-match
o.a.h.c.protocol.RequestAuthCache - Auth cache not set in the context
o.a.h.i.c.PoolingHttpClientConnectionManager - Connection request: [route: {s}->https://localhost:8443][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
o.a.h.i.c.PoolingHttpClientConnectionManager - Connection leased: [id: 0][route: {s}->https://localhost:8443][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
o.a.h.impl.execchain.MainClientExec - Stale connection check
org.apache.http.wire - http-outgoing-0 << "[read] I/O error: Read timed out"
o.a.h.impl.execchain.MainClientExec - Executing request GET /greeting?name=Greeting HTTP/1.1
o.a.h.impl.execchain.MainClientExec - Proxy auth state: UNCHALLENGED
org.apache.http.headers - http-outgoing-0 >> GET /greeting?name=Greeting HTTP/1.1
org.apache.http.headers - http-outgoing-0 >> Authorization: Bearer 1a59e04c-afb0-40cd-9e17-4e573beea347
org.apache.http.headers - http-outgoing-0 >> Host: localhost:8443
org.apache.http.headers - http-outgoing-0 >> Connection: Keep-Alive
org.apache.http.headers - http-outgoing-0 >> User-Agent: Apache-HttpClient/4.3.4 (java 1.5)
org.apache.http.headers - http-outgoing-0 >> Accept-Encoding: gzip,deflate
org.apache.http.wire - http-outgoing-0 >> "GET /greeting?name=Greeting HTTP/1.1[\r][\n]"
org.apache.http.wire - http-outgoing-0 >> "Authorization: Bearer 1a59e04c-afb0-40cd-9e17-4e573beea347[\r][\n]"
org.apache.http.wire - http-outgoing-0 >> "Host: localhost:8443[\r][\n]"
org.apache.http.wire - http-outgoing-0 >> "Connection: Keep-Alive[\r][\n]"
org.apache.http.wire - http-outgoing-0 >> "User-Agent: Apache-HttpClient/4.3.4 (java 1.5)[\r][\n]"
org.apache.http.wire - http-outgoing-0 >> "Accept-Encoding: gzip,deflate[\r][\n]"
org.apache.http.wire - http-outgoing-0 >> "[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "HTTP/1.1 200 OK[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "Server: Apache-Coyote/1.1[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "X-Content-Type-Options: nosniff[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "X-XSS-Protection: 1; mode=block[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "Cache-Control: no-cache, no-store, max-age=0, must-revalidate[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "Pragma: no-cache[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "Expires: 0[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "Strict-Transport-Security: max-age=31536000 ; includeSubDomains[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "X-Frame-Options: DENY[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "Set-Cookie: JSESSIONID=8FC93D46387663ED9D1EA7F97C7F9B45; Path=/; Secure; HttpOnly[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "X-Application-Context: application[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "Content-Type: application/hal+json[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "Transfer-Encoding: chunked[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "Date: Fri, 31 Oct 2014 19:03:42 GMT[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "2a[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "{"person":"Greeting","date":1414782222693}[\r][\n]"
org.apache.http.headers - http-outgoing-0 << HTTP/1.1 200 OK
org.apache.http.headers - http-outgoing-0 << Server: Apache-Coyote/1.1
org.apache.http.headers - http-outgoing-0 << X-Content-Type-Options: nosniff
org.apache.http.headers - http-outgoing-0 << X-XSS-Protection: 1; mode=block
org.apache.http.headers - http-outgoing-0 << Cache-Control: no-cache, no-store, max-age=0, must-revalidate
org.apache.http.headers - http-outgoing-0 << Pragma: no-cache
org.apache.http.headers - http-outgoing-0 << Expires: 0
org.apache.http.headers - http-outgoing-0 << Strict-Transport-Security: max-age=31536000 ; includeSubDomains
org.apache.http.headers - http-outgoing-0 << X-Frame-Options: DENY
org.apache.http.headers - http-outgoing-0 << Set-Cookie: JSESSIONID=8FC93D46387663ED9D1EA7F97C7F9B45; Path=/; Secure; HttpOnly
org.apache.http.headers - http-outgoing-0 << X-Application-Context: application
org.apache.http.headers - http-outgoing-0 << Content-Type: application/hal+json
org.apache.http.headers - http-outgoing-0 << Transfer-Encoding: chunked
org.apache.http.headers - http-outgoing-0 << Date: Fri, 31 Oct 2014 19:03:42 GMT
o.a.h.impl.execchain.MainClientExec - Connection can be kept alive indefinitely
o.a.h.c.p.ResponseProcessCookies - Cookie accepted [JSESSIONID="8FC93D46387663ED9D1EA7F97C7F9B45", version:0, domain:localhost, path:/, expiry:null]
org.apache.http.wire - http-outgoing-0 << "0[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "[\r][\n]"
o.a.h.i.c.PoolingHttpClientConnectionManager - Connection [id: 0][route: {s}->https://localhost:8443] can be kept alive indefinitely
o.a.h.i.c.PoolingHttpClientConnectionManager - Connection released: [id: 0][route: {s}->https://localhost:8443][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
<--- HTTP 200 https://localhost:8443/greeting?name=Greeting (324ms)
Server: Apache-Coyote/1.1
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Set-Cookie: JSESSIONID=8FC93D46387663ED9D1EA7F97C7F9B45; Path=/; Secure; HttpOnly
X-Application-Context: application
Content-Type: application/hal+json
Transfer-Encoding: chunked
Date: Fri, 31 Oct 2014 19:03:42 GMT
{"person":"Greeting","date":1414782222693}
<--- END HTTP (42-byte body)
Process finished with exit code 0
Actual output:
o.a.h.c.protocol.RequestAddCookies - CookieSpec selected: best-match
o.a.h.c.protocol.RequestAuthCache - Auth cache not set in the context
o.a.h.i.c.PoolingHttpClientConnectionManager - Connection request: [route: {s}->https://localhost:8443][total kept alive: 0; route allocated: 0 of 2; total allocated: 0 of 20]
o.a.h.i.c.PoolingHttpClientConnectionManager - Connection leased: [id: 0][route: {s}->https://localhost:8443][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
o.a.h.impl.execchain.MainClientExec - Opening connection {s}->https://localhost:8443
o.a.h.i.c.HttpClientConnectionOperator - Connecting to localhost/127.0.0.1:8443
o.a.h.i.c.HttpClientConnectionOperator - Connection established 127.0.0.1:55456<->127.0.0.1:8443
o.a.h.impl.execchain.MainClientExec - Executing request POST /oauth/token HTTP/1.1
o.a.h.impl.execchain.MainClientExec - Proxy auth state: UNCHALLENGED
org.apache.http.headers - http-outgoing-0 >> POST /oauth/token HTTP/1.1
org.apache.http.headers - http-outgoing-0 >> Authorization: Basic bW9iaWxlOg==
org.apache.http.headers - http-outgoing-0 >> Content-Length: 80
org.apache.http.headers - http-outgoing-0 >> Content-Type: application/x-www-form-urlencoded; charset=UTF-8
org.apache.http.headers - http-outgoing-0 >> Host: localhost:8443
org.apache.http.headers - http-outgoing-0 >> Connection: Keep-Alive
org.apache.http.headers - http-outgoing-0 >> User-Agent: Apache-HttpClient/4.3.4 (java 1.5)
org.apache.http.headers - http-outgoing-0 >> Accept-Encoding: gzip,deflate
org.apache.http.wire - http-outgoing-0 >> "POST /oauth/token HTTP/1.1[\r][\n]"
org.apache.http.wire - http-outgoing-0 >> "Authorization: Basic bW9iaWxlOg==[\r][\n]"
org.apache.http.wire - http-outgoing-0 >> "Content-Length: 80[\r][\n]"
org.apache.http.wire - http-outgoing-0 >> "Content-Type: application/x-www-form-urlencoded; charset=UTF-8[\r][\n]"
org.apache.http.wire - http-outgoing-0 >> "Host: localhost:8443[\r][\n]"
org.apache.http.wire - http-outgoing-0 >> "Connection: Keep-Alive[\r][\n]"
org.apache.http.wire - http-outgoing-0 >> "User-Agent: Apache-HttpClient/4.3.4 (java 1.5)[\r][\n]"
org.apache.http.wire - http-outgoing-0 >> "Accept-Encoding: gzip,deflate[\r][\n]"
org.apache.http.wire - http-outgoing-0 >> "[\r][\n]"
org.apache.http.wire - http-outgoing-0 >> "username=admin&password=pass&client_id=mobile&client_secret=&grant_type=password"
org.apache.http.wire - http-outgoing-0 << "HTTP/1.1 400 Bad Request[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "Server: Apache-Coyote/1.1[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "X-Content-Type-Options: nosniff[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "X-XSS-Protection: 1; mode=block[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "Cache-Control: no-cache, no-store, max-age=0, must-revalidate[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "Pragma: no-cache[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "Expires: 0[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "Strict-Transport-Security: max-age=31536000 ; includeSubDomains[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "X-Frame-Options: DENY[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "X-Application-Context: application:8443[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "Cache-Control: no-store[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "Pragma: no-cache[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "Content-Type: application/json;charset=UTF-8[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "Transfer-Encoding: chunked[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "Date: Fri, 31 Oct 2014 18:06:51 GMT[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "Connection: close[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "3f[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "{"error":"invalid_grant","error_description":"Bad credentials"}[\r][\n]"
org.apache.http.headers - http-outgoing-0 << HTTP/1.1 400 Bad Request
org.apache.http.headers - http-outgoing-0 << Server: Apache-Coyote/1.1
org.apache.http.headers - http-outgoing-0 << X-Content-Type-Options: nosniff
org.apache.http.headers - http-outgoing-0 << X-XSS-Protection: 1; mode=block
org.apache.http.headers - http-outgoing-0 << Cache-Control: no-cache, no-store, max-age=0, must-revalidate
org.apache.http.headers - http-outgoing-0 << Pragma: no-cache
org.apache.http.headers - http-outgoing-0 << Expires: 0
org.apache.http.headers - http-outgoing-0 << Strict-Transport-Security: max-age=31536000 ; includeSubDomains
org.apache.http.headers - http-outgoing-0 << X-Frame-Options: DENY
org.apache.http.headers - http-outgoing-0 << X-Application-Context: application:8443
org.apache.http.headers - http-outgoing-0 << Cache-Control: no-store
org.apache.http.headers - http-outgoing-0 << Pragma: no-cache
org.apache.http.headers - http-outgoing-0 << Content-Type: application/json;charset=UTF-8
org.apache.http.headers - http-outgoing-0 << Transfer-Encoding: chunked
org.apache.http.headers - http-outgoing-0 << Date: Fri, 31 Oct 2014 18:06:51 GMT
org.apache.http.headers - http-outgoing-0 << Connection: close
org.apache.http.wire - http-outgoing-0 << "0[\r][\n]"
org.apache.http.wire - http-outgoing-0 << "[\r][\n]"
o.a.h.i.c.DefaultManagedHttpClientConnection - http-outgoing-0: Shutdown connection
o.a.h.impl.execchain.MainClientExec - Connection discarded
o.a.h.i.c.DefaultManagedHttpClientConnection - http-outgoing-0: Close connection
o.a.h.i.c.PoolingHttpClientConnectionManager - Connection released: [id: 0][route: {s}->https://localhost:8443][total kept alive: 0; route allocated: 0 of 2; total allocated: 0 of 20]
---- ERROR
org.portotech.pague360mpayments.security.SecuredRestException: org.portotech.pague360mpayments.security.SecuredRestException: Login failure: 400 - Bad Request
at org.portotech.pague360mpayments.security.SecuredRestBuilder$OAuthHandler.intercept(SecuredRestBuilder.java:150)
at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:300)
at retrofit.RestAdapter$RestHandler.invoke(RestAdapter.java:240)
at com.sun.proxy.$Proxy2.greeting(Unknown Source)
at org.portotech.pague360mpayments.rest.controller.GreetingControllerTest.testGreetingInHttp(GreetingControllerTest.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at junit.framework.TestCase.runTest(TestCase.java:176)
at junit.framework.TestCase.runBare(TestCase.java:141)
at junit.framework.TestResult$1.protect(TestResult.java:122)
at junit.framework.TestResult.runProtected(TestResult.java:142)
at junit.framework.TestResult.run(TestResult.java:125)
at junit.framework.TestCase.run(TestCase.java:129)
at junit.framework.TestSuite.runTest(TestSuite.java:255)
at junit.framework.TestSuite.run(TestSuite.java:250)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:74)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:211)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: org.portotech.pague360mpayments.security.SecuredRestException: Login failure: 400 - Bad Request
at org.portotech.pague360mpayments.security.SecuredRestBuilder$OAuthHandler.intercept(SecuredRestBuilder.java:138)
... 26 more
---- END ERROR
retrofit.RetrofitError: org.portotech.pague360mpayments.security.SecuredRestException: Login failure: 400 - Bad Request
at retrofit.RetrofitError.unexpectedError(RetrofitError.java:44)
at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:395)
at retrofit.RestAdapter$RestHandler.invoke(RestAdapter.java:240)
at com.sun.proxy.$Proxy2.greeting(Unknown Source)
at org.portotech.pague360mpayments.rest.controller.GreetingControllerTest.testGreetingInHttp(GreetingControllerTest.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:74)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:211)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: org.portotech.pague360mpayments.security.SecuredRestException: org.portotech.pague360mpayments.security.SecuredRestException: Login failure: 400 - Bad Request
at org.portotech.pague360mpayments.security.SecuredRestBuilder$OAuthHandler.intercept(SecuredRestBuilder.java:150)
at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:300)
... 25 more
Caused by: org.portotech.pague360mpayments.security.SecuredRestException: Login failure: 400 - Bad Request
at org.portotech.pague360mpayments.security.SecuredRestBuilder$OAuthHandler.intercept(SecuredRestBuilder.java:138)
... 26 more
Process finished with exit code 255
Leaving aside the strange implementation of the sample app referred to, there is (or was) an issue in Spring Boot making thing difficult gh-1801. A workaround is described there, and also used in this sample.
Related
I'm using KerberosTemplate to make a POST request to a kerberos authenticated rest API.
I can successfully run an insecure request on the command line but when I try to do a secure call with HTTP client It returns a 401 unauthorized error.
I tried to turn of certificate checking as we dont use it and I also tries the username without the domain but that has no affect either.
I also tried to kerb4j rest template too but I get the same issue. From the code you can also see that Im checking the keytab file exists as well.
Appreciate some help, thanks.
import ErrorHandlers.KerberosRestTemplateResponseErrorHandler;
import POJOs.PostBody;
import POJOs.PostResponse;
import com.fasterxml.jackson.databind.SerializationFeature;
//import com.kerb4j.client.spring.KerberosRestTemplate;
import org.springframework.security.kerberos.client.KerberosRestTemplate;
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
import org.apache.http.conn.ssl.TrustStrategy;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import javax.net.ssl.SSLContext;
import java.io.File;
import java.security.KeyManagementException;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.cert.X509Certificate;
public class KerbTemplate {
public static void main(String[] args) throws KeyStoreException, NoSuchAlgorithmException, KeyManagementException {
PostBody postRequestBody = new PostBody();
postRequestBody.setAggregation("data");
postRequestBody.setEndDate("2119-03-30");
postRequestBody.setStartDate("1900-03-30");
postRequestBody.setMetadata(new String[] {"PARTIAL"});
postRequestBody.setSymbols(new String[] {"requestdata"});
postRequestBody.setModifiedDate("2019-07-20");
postRequestBody.setFirstWeekday("0");
TrustStrategy acceptingTrustStrategy = ((X509Certificate[] chain, String authType) -> true);
SSLContext sslContext = org.apache.http.ssl.SSLContexts.custom().loadTrustMaterial(null, acceptingTrustStrategy).build();
SSLConnectionSocketFactory csf = new SSLConnectionSocketFactory(sslContext);
CloseableHttpClient httpClient = HttpClients.custom().setSSLSocketFactory(csf).build();
HttpComponentsClientHttpRequestFactory requestFactory = new HttpComponentsClientHttpRequestFactory();
requestFactory.setHttpClient(httpClient);
String base = System.getProperty("user.dir");
String keytab = base+ File.separator+"src"+File.separator+"main"+File.separator+"resources"+File.separator+"username.keytab";
System.out.println(keytab);
File f = new File(keytab);
if(f.exists() && !f.isDirectory()) {
System.out.println("File exists");
}
KerberosRestTemplate kerberosRestTemplate = new KerberosRestTemplate( keytab,"'username#domain",requestFactory.getHttpClient());
kerberosRestTemplate.setErrorHandler(new KerberosRestTemplateResponseErrorHandler());
MappingJackson2HttpMessageConverter jsonHttpMessageConverter = new MappingJackson2HttpMessageConverter();
jsonHttpMessageConverter.getObjectMapper().configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
kerberosRestTemplate.getMessageConverters().add(jsonHttpMessageConverter);
// Add CSRF header if required:
HttpHeaders headers = new HttpHeaders();
headers.set("X-Requested-By", "'username#domain");
headers.setContentType(MediaType.APPLICATION_JSON);
headers.set("Client-Type","Web");
headers.set("Client-UI-Component","Jim");
HttpEntity<PostBody> postRequest = new HttpEntity<PostBody>(postRequestBody, headers);
PostResponse pr = kerberosRestTemplate.postForObject("https://url.com/1/data/loadList", postRequest, PostResponse.class);
}
}
package ErrorHandlers;
import org.springframework.http.HttpStatus;
import org.springframework.http.client.ClientHttpResponse;
import org.springframework.web.client.ResponseErrorHandler;
import java.io.IOException;
public class KerberosRestTemplateResponseErrorHandler implements ResponseErrorHandler {
#Override
public boolean hasError(ClientHttpResponse httpResponse) throws IOException {
return (
httpResponse.getStatusCode().series() == HttpStatus.Series.CLIENT_ERROR
|| httpResponse.getStatusCode().series() == HttpStatus.Series.SERVER_ERROR);
}
#Override
public void handleError(ClientHttpResponse httpResponse) throws IOException {
System.out.println("Error Response code " + httpResponse.getRawStatusCode());
System.out.println(httpResponse.getStatusText());
System.out.println(httpResponse.getBody().toString());
}
}
Updated with Partial logs
1:56:58.233 [Finalizer] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection manager is shutting down
21:56:58.245 [Finalizer] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection manager shut down
21:58:30.261 [main] DEBUG org.springframework.security.kerberos.client.KerberosRestTemplate - HTTP POST myendpoint.com
21:58:30.460 [main] DEBUG org.springframework.security.kerberos.client.KerberosRestTemplate - Accept=[application/json, application/*+json]
21:58:30.500 [main] DEBUG org.springframework.security.kerberos.client.KerberosRestTemplate - Writing [ClassPojo [firstWeekday = 0, metadata = [Ljava.lang.String;#2f465398, endDate = 2119-03-30, modifiedDate = 2019-07-20, aggregation = DAILY, symbols = [Ljava.lang.String;#548e6d58, startDate = 1900-03-30]] as "application/json"
21:58:30.540 [main] DEBUG org.apache.http.client.protocol.RequestAddCookies - CookieSpec selected: default
21:58:30.561 [main] DEBUG org.apache.http.client.protocol.RequestAuthCache - Auth cache not set in the context
21:58:30.565 [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection request: [route: {s}->myendpoint.com:443][total kept alive: 0; route allocated: 0 of 2; total allocated: 0 of 20]
21:58:30.587 [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection leased: [id: 0][route: {s}->myendpoint.com:443][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
21:58:30.591 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Opening connection {s}->myendpoint.com:443
21:58:30.617 [main] DEBUG org.apache.http.impl.conn.DefaultHttpClientConnectionOperator - Connecting to myendpoint.com:443
21:58:30.617 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - Connecting socket to myendpoint.com:443 with timeout 0
21:58:30.747 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - Enabled protocols: [TLSv1, TLSv1.1, TLSv1.2]
21:58:30.747 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - Enabled cipher suites:[TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, TLS_DHE_DSS_WITH_AES_256_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_DSS_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_DSS_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, TLS_EMPTY_RENEGOTIATION_INFO_SCSV]
21:58:30.747 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - Starting handshake
21:58:30.923 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - Secure session established
21:58:30.923 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - negotiated protocol: TLSv1.2
21:58:30.924 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - negotiated cipher suite: TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
21:58:30.933 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - peer principal: CN=myendpoint.com, O=EXAMPLE p.l.c.
21:58:30.934 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - peer alternative names: [myendpoint.com]
21:58:30.962 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Executing request POST /1/data/loadList HTTP/1.1
21:58:30.963 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Target auth state: UNCHALLENGED
21:58:30.968 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Proxy auth state: UNCHALLENGED
21:58:30.976 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> POST /1/data/loadList HTTP/1.1
21:58:30.979 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Accept: application/json, application/+json
21:58:30.979 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Client-Type: Fred
21:58:30.980 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Content-Type: application/json
21:58:30.981 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Client-UI-Component: Jim
21:58:30.981 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Content-Length: 220
21:58:30.982 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Host: myendpoint.com
21:58:30.983 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Connection: Keep-Alive
21:58:30.983 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> User-Agent: Apache-HttpClient/4.5.9 (Java/1.8.0_212-3-redhat)
21:58:30.983 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Accept-Encoding: gzip,deflate
21:58:30.984 [main] DEBUG org.apache.http.wire - http-outgoing-0 >> "POST /1/data/loadList HTTP/1.1[\r][\n]"
21:58:30.984 [main] DEBUG org.apache.http.wire - http-outgoing-0 >> "Accept: application/json, application/+json[\r][\n]"
21:58:30.984 [main] DEBUG org.apache.http.wire - http-outgoing-0 >> "Client-Type: Fred[\r][\n]"
21:58:30.985 [main] DEBUG org.apache.http.wire - http-outgoing-0 >> "Content-Type: application/json[\r][\n]"
21:58:30.986 [main] DEBUG org.apache.http.wire - http-outgoing-0 >> "Client-UI-Component: Jim[\r][\n]"
21:58:30.986 [main] DEBUG org.apache.http.wire - http-outgoing-0 >> "Content-Length: 220[\r][\n]"
21:58:30.986 [main] DEBUG org.apache.http.wire - http-outgoing-0 >> "Host: myendpoint.com[\r][\n]"
21:58:30.988 [main] DEBUG org.apache.http.wire - http-outgoing-0 >> "Connection: Keep-Alive[\r][\n]"
21:58:30.990 [main] DEBUG org.apache.http.wire - http-outgoing-0 >> "User-Agent: Apache-HttpClient/4.5.9 (Java/1.8.0_212-3-redhat)[\r][\n]"
21:58:30.990 [main] DEBUG org.apache.http.wire - http-outgoing-0 >> "Accept-Encoding: gzip,deflate[\r][\n]"
21:58:30.991 [main] DEBUG org.apache.http.wire - http-outgoing-0 >> "[\r][\n]"
21:58:30.992 [main] DEBUG org.apache.http.wire - http-outgoing-0 >> "{"firstWeekday":"0","metadata":["All"],"endDate":"2119-03-30","modifiedDate":"2019-07-20","aggregation":"DAILY","symbols":["symbol1","symbol2"],"startDate":"1900-03-30"}"
21:58:31.043 [main] DEBUG org.apache.http.wire - http-outgoing-0 << "HTTP/1.1 401 [\r][\n]"
21:58:31.043 [main] DEBUG org.apache.http.wire - http-outgoing-0 << "Access-Control-Allow-Credentials: true[\r][\n]"
21:58:31.043 [main] DEBUG org.apache.http.wire - http-outgoing-0 << "Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE[\r][\n]"
21:58:31.043 [main] DEBUG org.apache.http.wire - http-outgoing-0 << "Access-Control-Max-Age: 3600[\r][\n]"
21:58:31.043 [main] DEBUG org.apache.http.wire - http-outgoing-0 << "Access-Control-Allow-Headers: Client-Type, Content-Type, Accept, X-Requested-With, Authorization, rejectunauthorized[\r][\n]"
21:58:31.044 [main] DEBUG org.apache.http.wire - http-outgoing-0 << "WWW-Authenticate: Negotiate[\r][\n]"
21:58:31.044 [main] DEBUG org.apache.http.wire - http-outgoing-0 << "X-Content-Type-Options: nosniff[\r][\n]"
21:58:31.044 [main] DEBUG org.apache.http.wire - http-outgoing-0 << "X-XSS-Protection: 1; mode=block[\r][\n]"
21:58:31.044 [main] DEBUG org.apache.http.wire - http-outgoing-0 << "Cache-Control: no-cache, no-store, max-age=0, must-revalidate[\r][\n]"
21:58:31.044 [main] DEBUG org.apache.http.wire - http-outgoing-0 << "Pragma: no-cache[\r][\n]"
21:58:31.044 [main] DEBUG org.apache.http.wire - http-outgoing-0 << "Expires: 0[\r][\n]"
21:58:31.044 [main] DEBUG org.apache.http.wire - http-outgoing-0 << "Strict-Transport-Security: max-age=31536000 ; includeSubDomains[\r][\n]"
21:58:31.044 [main] DEBUG org.apache.http.wire - http-outgoing-0 << "X-Frame-Options: DENY[\r][\n]"
21:58:31.044 [main] DEBUG org.apache.http.wire - http-outgoing-0 << "Transfer-Encoding: chunked[\r][\n]"
21:58:31.044 [main] DEBUG org.apache.http.wire - http-outgoing-0 << "Date: Wed, 11 Sep 2019 20:58:31 GMT[\r][\n]"
21:58:31.044 [main] DEBUG org.apache.http.wire - http-outgoing-0 << "[\r][\n]"
21:58:31.050 [main] DEBUG org.apache.http.headers - http-outgoing-0 << HTTP/1.1 401
21:58:31.050 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Access-Control-Allow-Credentials: true
21:58:31.050 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE
21:58:31.051 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Access-Control-Max-Age: 3600
21:58:31.051 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Access-Control-Allow-Headers: Client-Type, Content-Type, Accept, X-Requested-With, Authorization, rejectunauthorized
21:58:31.051 [main] DEBUG org.apache.http.headers - http-outgoing-0 << WWW-Authenticate: Negotiate
21:58:31.051 [main] DEBUG org.apache.http.headers - http-outgoing-0 << X-Content-Type-Options: nosniff
21:58:31.051 [main] DEBUG org.apache.http.headers - http-outgoing-0 << X-XSS-Protection: 1; mode=block
21:58:31.051 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Cache-Control: no-cache, no-store, max-age=0, must-revalidate
21:58:31.051 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Pragma: no-cache
21:58:31.051 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Expires: 0
21:58:31.051 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Strict-Transport-Security: max-age=31536000 ; includeSubDomains
21:58:31.051 [main] DEBUG org.apache.http.headers - http-outgoing-0 << X-Frame-Options: DENY
21:58:31.051 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Transfer-Encoding: chunked
21:58:31.051 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Date: Wed, 11 Sep 2019 20:58:31 GMT
21:58:31.063 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Connection can be kept alive indefinitely
21:58:31.063 [main] DEBUG org.apache.http.impl.auth.HttpAuthenticator - Authentication required
21:58:31.063 [main] DEBUG org.apache.http.impl.auth.HttpAuthenticator - myendpoint.com:443 requested authentication
21:58:31.063 [main] DEBUG org.apache.http.impl.client.TargetAuthenticationStrategy - Authentication schemes in the order of preference: [Negotiate, Kerberos, NTLM, CredSSP, Digest, Basic]
21:58:31.081 [main] DEBUG org.apache.http.impl.auth.SPNegoScheme - Received challenge '' from the auth server
21:58:31.082 [main] DEBUG org.apache.http.impl.client.TargetAuthenticationStrategy - Challenge for Kerberos authentication scheme not available
21:58:31.083 [main] DEBUG org.apache.http.impl.client.TargetAuthenticationStrategy - Challenge for NTLM authentication scheme not available
21:58:31.083 [main] DEBUG org.apache.http.impl.client.TargetAuthenticationStrategy - Challenge for CredSSP authentication scheme not available
21:58:31.083 [main] DEBUG org.apache.http.impl.client.TargetAuthenticationStrategy - Challenge for Digest authentication scheme not available
21:58:31.083 [main] DEBUG org.apache.http.impl.client.TargetAuthenticationStrategy - Challenge for Basic authentication scheme not available
21:58:31.093 [main] DEBUG org.springframework.security.kerberos.client.KerberosRestTemplate - Response 401 UNAUTHORIZED
Error Response code 401
21:58:31.096 [main] DEBUG org.apache.http.wire - http-outgoing-0 << "0[\r][\n]"
21:58:31.097 [main] DEBUG org.apache.http.wire - http-outgoing-0 << "[\r][\n]"
21:58:31.097 [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection [id: 0][route: {s}->myendpoint.com:443] can be kept alive indefinitely
21:58:31.097 [main] DEBUG org.apache.http.impl.conn.DefaultManagedHttpClientConnection - http-outgoing-0: set socket timeout to 0
21:58:31.097 [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection released: [id: 0][route: {s}->myendpoint.com:443][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
Process finished with exit code 0
I am connecting to a third party rest application (with limited documentation) and one of the requests returns a jpeg. I normally use an ObjectMapper to convert the json response to an object which works fine but I don't know how to convert the following response to an image:
10:18:29.885 [main] DEBUG org.apache.http.headers - http-outgoing-0 << HTTP/1.1 200 OK
10:18:29.885 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Cache-Control: no-cache, must-revalidate
10:18:29.885 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Content-Length: 25001
10:18:29.885 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Connection: close
10:18:29.885 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Content-Type: image/jpeg
10:18:29.885 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Date: Thu, 27 Jul 2017 09:18:29 GMT
10:18:29.897 [main] DEBUG org.apache.http.wire - http-outgoing-0 << "[0xb1][0xe7][0x8b][0x2][0xdb]K[0xe][0xde]c[0xf1][0x9c][0xff][0x0]t`z[0xe7][0x9a][0xda]{{Ym[0xd6][0x1f]*?%W[0x8][0xaa][0x0][\n]"
10:18:29.897 [main] DEBUG org.apache.http.wire - http-outgoing-0 << "=[0xb1][0xd3][0xf0][0xaa][0x1]"[0xd3][0xad]m[0xe1]x[0x84]~`[0x94][0xee][0x95][0xe5];[0x9e]F[0xfe][0xf3][0x13][0xc9]?[0xcb][0xb6]+/P[0x96]M[0x1c]([0xb0]v[0xb8][0x99][0xff][0x0][0xd5]i[0xf9][0xc9][0x93][0xe8][0x84]z[0xb1][0xe0]{[0xf4][0xaa][0xd3][0xdd]j[0x8]|[0x8d][0x9][0xcd][0xdc] [0xe2]I[0xa4][0x19]XG}[0x87][0xf8][0xdb][0xd0][0xe]={U[0xed]0[0xd9].[0xf1][0xb]9[0xb9][0xf5][0xcd]9[0xfd][0xf3][0x9f][0xf6][0x8f][0xa0][0xe0]zS[\r][0x88][0xb4][0xc9][0x16]y[0xd6]mI[0x87][0xf6][0x92][0x8e]"n[0x12][0xc][0xf5][0x11][0x8e][0xff][0x0][0xef]u>[0xc3][0x8a][0xd2][0xbc]ke[0xb6][0x91][0xaf][0xc]b[0x4][0x19]s![0xc2][0xaf][0xbf][0xb5]T[0xd4][0xa4][0xb4][\n]"
10:18:29.897 [main] DEBUG org.apache.http.wire - http-outgoing-0 << "[0xb1]O[0x19][0x9a]g[0xff][0x0]U[0x14]c2[0xb7][0xfb][0xbe][0x83][0xdc][0xe0][0xe][0xf5][0x99][0x5][0x96][0xa1]o2[0xdd]jc[0xed][0x91]![0xcc]0)[0xdc]-[0x87]c[0xfe][0xdb][0xb5][0xdb][0xb6];[0x81][0xe6]4[[0xea]7Ro[0x8d]e[0x1a]?k9[0x18][0xac][0xb3][0xfb][0xfa][0xaa][0xb3][0xd4][0xf7][0xad][0xfb];[0xcb]y[0xd0]$[0x18]M[0x83][0x1e]V[0xdd][0xa5]1[0xdb][0x1e][0x9f]J[0x8e];[0xc8]&[0x89][0xa6]IT[0xa2][0x8c][0xb1]'[0x1b]G[0xbf][0xa5]d[0xde]E.[0xbb][0x8f][0xb2]3[0xd9][0xc5][0xff][0x0]?[0xea]1#[0x8f]H[0xc7][0xa7][0xfb]G[0xf0][0xf5][0xa6]+[0x97]5;[0x84][0xbd]v[0xb2][0xb5][0x85].n[0x93][0xef]HN[0x12][0xdf][0xd0][0xb3][0xe][0xff][0x0][0xec][0x8e]O[0xb7]Z[0xaf]a[0x14][0xba][0x1e][0xf7][0xbb]f[0xbe]i1[0xe6][0xdf][0x11][0xfb][0xc3][0xec]Ge[0x1d][0x80][0xe0]{[0x9a][Y[0xbf][0xb2]bKY[0xe0]X[0xe0]^[0x12]X[0x87][0xca]O[0xab]{[0x9f]^[0xf5]b[0xe3]RDe[0x8a][0x5][0xfb]M[0xc3][0xae]V([0xc8][0xe9][0xea][0xc7][0xa2][0xaf][0xb9][0xfc][0x1][0xe9]E[0x82][0xe5][0xd9]5;Xm[0xfe][0xd2][0xf3][0xa8][0x88][0xe0][0x2]9,O#[0x7]R}[0x87]5[0x8f]w[0xa5][0xcf][0xac][0xca][0xb7]S[0x8f][0xb1]"[0x1d][0xc9]m[0xc1]3zy[0xdd][0xb1][0xfe][0xc8][0xfc]s[0xd0]Go[0xa2]Omr[0xda][0x8a][0xcc][0x92]^7[0xfc][0xb3][0xdb][0x88]c[0x1f][0xdd]A[0xdb][0xdd][0xba][0x9f]j[0xd0][0x8f]S[0x84][0xab][0xb][0x83][0xf6]W[0x8c]e[0xd6]S[0x80][0x7][0xae]{[0xd0][0x4][0xf6][0xfa][0x9e]d[0x16][0xf7]k[0xe4]\v[0x1f][0xc2][0xff][0x0][0xee][0x9f][0xe9]P]_I|[0xd2]Y[0xe9][0xea][0x8f][0x82]Rk[0x99][0x6][0xe8][0xa2]=[0xc0][0x1f][0xc6][0xfe][0xc3][0x81][0xdc][0xf6][0xaa][0x97]1I[0xaf][0xc2]b`[0xf6][0xf6][\r][0xfc]x[0xdb]4[0xbf][0xee][0xff][0x0]q}[0xfa][0x9f]a[0xc9]t/&[0x8f][0x12]#P=[0x94]`*4k[0x83][0x18][0xf4]#[0xd2][0x81][0x8b]e[0xa7][0xb7][0x87]a1[0xda][0x17][0xb9][0xb7]c[0xbe]_1[0xb7]J[[0xbb][0x13][0xdf][0xfa]t[0x18][0xab]R[0xeb][0x16][0xeb][\n]"
10:18:29.897 [main] DEBUG org.apache.http.wire - http-outgoing-0 << "<e[0xa7][0x92]RDPF?x[0xe7][0xb8][0xc7]lw'[0x81]PM[0xaa][0xac][0x8d][0xe4][0xd8][0x85][0xb9][0x9c][0x80]O8H[0x87][0xab][0x9e][0xdf]N[0xa7][0xdb][0xad]T[0x8f]J[0xfb],[0xf2]_Ap[P[0x98]bYXa\[0xe][0x8a][0x17][0xf8]Tz~'[0x9e]h[0x11]'[0xf6];]]&[0xa5]}([0x17][0xe8][0x8][0x80][0xc5][0xf7]-[0x81][0xea][0x17][0xfb][0xc4][0xf7]c[0xd7][0xb6][0x5]X:[0x89][0xb1]R5[0x12][0xb1]"[0x8c][0xfd][0xa3]8L{[0xfa]UW[0xd7]"[0x83][0x9]z[0xa6][0x9][0xb3][0xb5]P|[0xde]i[0xec][0x13][0x1c][0x92]})[0xaf]lu<>[0xa9][0x18][0xf2][0x1][\r][0x1d][0x96]r[0xa0][0x8e][0x8d]![0x1f]y[0xbd][0x7]A[0xee]y[0xa7]`%u[0x97]Z[0x1f][0xbe]W[0x87]Ma[0xc4]G*[0xf7]#[0xd5][0xfb][0xaa][0x1f][0xee][0xf5]=[0xf0]8[0xa7][0xb5][0xb3]Z|[0xd6]$F?[0xe7][0x81][0xfb][0x87][0xe9][0xe9]P[0xb9][0xb8][0xb2]R`c<#[0x93][0x1b][0x9f][0x99]G[0xb1][0xac][0xf8]56[0xd7]c&[0xda]W[0x86][0xcf]8i[0x1][0xc4][0x92]{/[0xf7]W[0xfd][0xae][0xa7][0xb7][0xad][0x16][0x15][0xce][0x96][0x1d]Y[0xf5]e?[0xd8][0xdb]^,[0xed]k[0xd9][0x1][0xf2][0xd4][0xf7][\n]"
10:18:29.898 [main] DEBUG org.apache.http.wire - http-outgoing-0 << "[0xbd]\[0xfe]C[0xde][0x88]|<[0x96]2[0xc9]wa3%[0xe4][0xbf][0xeb][0xa4][0x93][0x9f];[0xd8][0xf6][0x3][0xd8][0xc][0xf]J[0xb2]t[0x81]n|[0xcd]8[0x8b]W[0x3][0xee]*[0xe2]6[0xf6][0xc7]j[0xab][0xff][0x0][0x9][0x16][0xdb][0xcf][0xec][0xc3]lN[0xa7][0x8c][0xf9][[0xb1][0x18][0x7][0xa1]g[0xe8][0x1][0xf4][0xe4][0x9e][0xc0][0xd6]z[0x96]Z[0x1a][0xd4][0x16][0xca]WT+b[0xeb][0xd5][0xa4]l#}[0xf][0xf4][0xa8][0xee]c[0xb8][0xd6][0xe3]1,F[0xd2][0xd1][0xba][0xcd]*~[0xf9][0xbd][0xd1]O[0xdc][0xfa][0xb7]>[0xd5]![0xd0][0xa3][0xbd]+.[0xac][0xc2][0xf6]e[0xe5][0x6]6[0xc7][0x9][0xff][0x0]a}}[0xce]M<[0xa5][0xe6][0x9d][0xf7]7^[[0xf][0xe1]?[0xeb][0x10]{z[0xff][0x0][0x9e][0x94]z[0x1]J[0xcb]O[0x9b][0xc3][0xd1][0x98][0xed][0x90][0xdd]Y[0xe7]sg[0x99][0x87][0xb9]=[[0xf1][0xfd]*[0xf3]j[0xd6][0xb]m[0xf6][0x83]p[0xa1]3[0xb4][0xc][0x1d][0xc5][0xbd][0x2][0x8e]I[0xf6][0x15][0x5][0xb6][0xb8][0xba][0xba][0xb0][0xd1][0x2]\[0xed];^[0xe5][0xce]"[0x88][0xfa]q[0xcb][0x11][0xe8]?1Q[0x1f][0xe]G[0x15][0xd1][0xd4]R[0xe1][0xce][0xa6]F[\r][0xcb][0x1][0x82]?[0xba][0x14]p[0xa3][0x8e][0xdf][0x8e]i[0xa0])[0xdf]i[0x97][0xda][0xb3][0xf9][0xf6][0xee][0xfa]:[0x8c][0x92]T[0xe2]i[0xbd][0x9b][0x1c] [0xfa]d[0x9a][0xb1]gu[0x15][0x82][0xad][0x94][0xd6][0xcb]b[0x87]h[0xfd][0xdb][0xfb][0xe7][0xd7][0xeb]S[0x8d]S[0xec][0xff][0x0][0xbb][0xd4][0x95]m[0x98][0xcb]Rv[0xde][0xf9][0xed]U[0xe7][0xb8][0x93]W[0x88][0xc5]e[\n]"
10:18:29.898 [main] DEBUG org.apache.http.wire - http-outgoing-0 << "[0x9b]v[0xeb]w:[0x9d][0x9f]T^[0xac]}[0xf8][0x1f]^[0x94][0xc0][0x9b]S[0x9a][0xce]8B][0x95]}[0xff][0x0]r07;[0x1f][0xf6]#[0xe4][0x9f][0xa7][0xf2][0xac]/'V[0x8d][0xc9][0x97][0xce]M3[0xb5][0xba]?[0xfa]#[0x1f][0xed]0[0xe8]?[0xd9][0x1f][0x89][0xab][0xb6][0x9a]T[0xba][0x9]g[0x80][0xbd][0xf2]?[0xdf]yNf[0x1e][0xc0][0xfa][0xb2]8[0xf6][0xab][0x83]Q[0xb4]xZ=Q[0x13][0xef][0x17]8+[0xf5][0xa6]H[0xdd]=[0xac][0xbe][0xce][0x16][0xc8]"F[0xbc][0x94]Q[0x82][0xf][0xb8][0xf5][0xf7][0xaa][0xba][0x8a]Z[0xda]0[0x9d]'[0xfb]5[0xc3][0x1f][0x94] [0xc9][0x94][0xfa]m[0x1c][0x9f][0xc3][0xeb]T[0xaf]c[0x9b]Rq.[0x9a][\r][0x89][0xeb][0xf6][0xb7]\[0x17][0x1f][0xec][0xa7][0xf7][0x8e]>[0x87][0xb1]k2[0xe9][0xdb][0xbe][0xd1][0x3][0x1b][0xbd][0xbc][0xcc][q[0x9b][0xfe][0x4]z}8[0x14][0x5][0xc6]&[0xa5]yw[0xba]=Q[0xff][0x0][0xb1][0xd4][0xc][0xed][0xc][0x3]8[0xf5]/[0xd1]~[0x83][0xf3][0x15][0x93]y[0xae]iS#[0xe9][0xba][0x6][0x9e]uk[0xc1][0xff][0x0]<[0x6][0x12]3[0xfd][0xe7][0x90][0xff][0x0][0x93]F[0xab][0xe1][0x9b][0x9f][0x10][0xb0][0xbc][0xf1][0xe][0xa4][0xb6]v[0xb1][0x9c][0xa5][0xa5][0xb9][0x1b]c[0x1f][0xed]9[0xe0][0x93][0xec]>[0x95]5[0xac][0x17][0x1a]T"-[0x1e][0x3][0x16][0x95][0xd5][0xa6][0x92]1[0xe6][0x9f][0xf6][0x95]z[0x9f][0xab]q[0xed][0xde][0x8d]#[0xe4]5[0xaf][0x8]j[0x92][0xb2]_[0xf8][0x83]RR[0xd2]|[0xab][0x1c][0x0][0xca][0xeb][0xe8][0xaa][0xf]_[0xc3]=:[0xd7]=[0xaa]x;R[0xd3][0xa0][[0xb1][0x11][0x96][0xd9][0xf9]V^X[0xf]p:[0x1f]n[0xa2][0xbd][0xaa][0xca]+U[0x6][0xe2][0xc][0xcb]#[0x8c]4[0xce]wH}[0x89]=>[0x94][0xcb][0x9b]H[0xed][0xa2][0x92][0xe6]'[0x8a][0x4]#[0xf7][0x91][0xcd][0xfe][0xa9][0xfe][0xa3][0xd7][0xfc][0x8a][0x97][0x1]\[0xf9][0xeb][0x4]S[0x83][0x15][0xaf]I[0xd5][0xfc]#m[0xe2]6[0x92][0xe7]J[0xb5]k[0x9][0xd4]nh[0xe6][0xe0][0xca]q[0xfc][0xb][0xd4][0x8f]s[0x83][0xec]k[0xce][0xae]m[0xa5][0xb4][0x9d][0xe0][0x9d][\n]"
10:18:29.898 [main] DEBUG org.apache.http.wire - http-outgoing-0 << "H[0x87][0x4]VMXm[0x16],u[[0x9d]:t[0xb8][0xb6].T[0xfb][0xae]:[0x8a][0xe9][0xb4]o[0x88][0x9a][0x9d][0x8e][0xa0].nH[0x9c]7[0xe][0xcc]2[0xfb]}[0x8d]q[0x95][0xb7][0xe1]=[0x19][0xb5][0xbd]j[0xb]\e3[0xb9][0xc9][0x19][0xc0][0x14]!\[0xf7][0x89]u=6[0xff][0x0]N[0xb7][0x92]h[0xcc][0xe6][0xe9]7En[0x8b][0xba]V[0xf5][0xda]==[0xce][0x7][0xad]f[0xc5][0xa3][0xea](wN[0x4][0x96][0x0][0xe5]4[0xc5][0x93];G[0xfb]L>[0xf1][0xff][0x0]d|[0xa3][0xd0][0xd5][0xbb][0x1d][0x1e]M[0x5][0x19][0xb4][0xf0]n[0x15][0xf1][0xe6]$[0xcd][0x99][0xe]=[0x1c][0xf3][0xf4][0x1d]=[0xaa][0xd7][0xf6][0xe5][0x9f][0xcb][0x1f][0xef][0x1a][0xe9][0xb8][E\[0xca][0xc7][0xbe][0x7][0xa7][0xbf]A[[0x14]Om}k$D#,B%[0xe6]6[0x1]v[0x1][0xed][0xd8]V}[0xd9]:[0xca][0x11][0xa7][0xc2][0xf][0x18][0x17][0xf2][0x2][0x11]}[0xd0]u[0x93][0xf9]{[0xd2][0xdc][0xe8]'Y[0x91].5m[0xab][0xb0][0xee][0x8a][0xde][0x13][0x95]C[0xd8][0xb9][0xff][0x0][0x96][0x84]z}[0xd1][0xdb][0xd6][0xa7][0x92][0xfa]}1[0x19][0xaf][0xf0][0xf6][0xe8]2nW[0xf8]G[0xab][0xe][0xdf]Z[0x0][0xa9]e[0x4][0xba][0x12][0xb7][0x9f][0xbe][0xf1]\[0xe6]K[0xd3][0xcc][0xad][0xfe][0xff][0x0][0xb7][0xb0][0xe0]U[0xe9][0xb5][X[0xd2]2[0x8e]f[0x92]_[0xf5]qB7;[0xfd][0x7]a[0xee]p[0x5]A[0x16][0xa5]6[0xab][0x10]}1T[[0xbf]K[0xc9]G[0xca][0xc3][0xd5][0x13][0xab]}N[0x7][0xd7][0xa5]C[0x6][0x84][0xba]{[0xcb]sc+[0xb][0xb9][0x8e]f[0x92]^|[0xef]c[0xe8][0x7]`8[0x14][0xc4]C>[0x87]&[0xa5]p[0xb7][0x97]L[0x96][0xee][0x87]tv[0xb1][0xfc][0xc9][0x9f]Y[0xf][0xf1][0x9f][0xd0]{[0xd5][0xc4][0xd4][0x1a]7[0x11]^[0xa7][0x93]![0xe8][0xe3][0xee]7[0xbe]{T2k[0xb0][0xdb][0xc8][0x96][0xd7][0x88][0xd1]^I[0xc4]p([0xdc]f?[0xec]z[0xff][0x0]![0xeb]Iq[0xa7]I[0xab][0xc6]c[0xd4][0x80][V?[0xf1][0xe8][0x87];[0xbf][0xdf]a[0xd7][0xe8]8[0xfa][0xd0][0x1e][0xa0][0xf7][0x92]j [0xc7]`[0x17][0xc9]<5[0xdc][0x8b][0xb9][0xf][0xa8]E[0xfe]?[0xaf][0xdd][0xfa][0xd4][0x16][0x9a]ch[0x8a][0xc3]O[0xdd],n[0xdb][0xa5][0x8e]V[0xcb][0xc8][0xdd][0xdb]w[0xaf][0xf9][0x3][0xb5]N#[0x9f]M[0x0]D[0xa6][0xe2][0xd9]F<[0xbf][0xe3]A[0xed][0xea]=[0xaa]([0xf5]Q[0xa9][0xa9][0x1a]K$[0xa0][0x1d][0xaf]p[0xff][0x0][0xea][0xe3]=[0xc7][0xfb]M[0xec]8[0xf5]4[0xc4]Z[0x1a][0xd5][0xae][0xc5][0xb][0xbd][0xe7]bB[0xdb]([0xcc][0x84][0xfd]==[0xfa][0xe][0xf5]R[0xef]K[0x1a][0xa3]$[0xfa][0x99][0x1b][0xe2];[0xa0][0x86]3[0x95][0x84][0xf6]$[0xff][0x0][0x1b]~[0x83][0xb0][0xef]J[0xba],qH[0xf7]Q[0xcc][0xe6][0xf9][0xfe][0xfd][0xd3][0x9c][0xb3][0xfb][0x1e][0xc1]}[0x87][0x15]Z[0xeb]W[[0x1c]&[0xa1][0xfb][0xa7]c[0xb6]2[0xa3]"S[0xe8][0xa3][0xd7][0xda][0x9a]Ar[0xd2]jSY[0x9d][0x97][0xc7]rv[0xb8][0x1d][0xf][0xfb][0xde][0x95][0x1b][0xea][0x13]jK[0x8b][0x17][0xf2][0xad][0x8f][[0xb2]2_[0xfe][0xb9][0x83][0xd7][0xfd][0xe3][0xc7][0xa6]j[0x9b][0xdb]K[0xa9][0xa9][0x17][0xe9][0xb2][0xd8][0xff][0x0][0xcb][0xa6]~[0xf7][0xfd]t#[0xaf][0xfb][0xa3][0x8f]Ri[0xde]T[0xf6]<[0xdb][0xfe][0xfa][0x1][0xff][0x0],I[0xf9][0x97][0xfd][0xda]v[0x15][0xc9]-[0xf4][0xe1][0xa5][0xa6]4[0xc0][0x11]3[0xb9][0xe2]s[0x90][0xe4][0xf5]$[0xfa][0x9f]ZV[0xd6][0x91][0x9b][0xec][0xf1]D[0xcf]zF~[0xcc]N[0xd2][0xa3][0xfb][0xcc]{/[0xbf]~[0xc2][0xaa]&[0xb0]uE+[0xa6]0[0x8][0xa7]l[0x97][0xc]2[0x10][0xf7][\n]"
10:18:29.898 [main] DEBUG org.apache.http.wire - http-outgoing-0 << "?[0x89][0xbf]A[0xef][0xd2][0x93][0xfb]:[0x8][0xc1]h[0xcb][0xac][0xec]w4[0xfb][0xb3]#[0x1f]V=[0xff][0x0][0xa7]lQ`[0xb9]a[0xb4][0xf8][0xe5]q5[0xf3][0x8b][0x8b][0x9c][0x10][0xae][0x6][0xd5][0x88][0x1e][0xa1][0x7]ory=[0xfd])[0xb3][0xdf][0xbe][0x95][0xb][0xcb]s'[0x99]j[0x83]&C[0xf7][0x90]{[0xfa][0xd5];[0xad]U[0xf4][0xf6]Hn[0x97][0xcd][0x92]^"1[0xf5][0xa8][0xec]=I[0xe2][0x91]!2[0xba][0xcf]t[0xcb]+[0xa9][0xcc]j[0xbf]r?q[0xea][0xda]?[0x86])[0xd8]W[0xee]XG}]D[0x93][0xe5],[0xcf]+o[0x9e]d[0xff][0x0][0xae][0x9e][0x83][0xfd][0x8f][0xcf][0xd2][0xac]Mk[0x1c][0x8c][0x1e]2a[0x94][0xe][0x19]8[0xfc][0xc5]e[0xcd][0x10][0xb7][0xdd]42[0x8b]}[0xa3]-[0x9f][0xb9][0xf8][0xfa]T[0x16][0xfa][0x84][0x9a][0x99][0xd9]8kX[0xe7][0x9f]*[0xd3][0x8f]\[0xf5][0xb][0xed][0xd4][0xd1]`;kMf[0xeb]Y[0x93][0xec][0xec][0x1b]K[0x8b][0xb4][0xcc]0[0xf7][0x3][0xd6]<[0x8f][0x95][0xda]9'[0xb5]l[\r][0x1e][0xc5]m[0xbe][0xca]-[0x94]G[0x92]s[0xce][0xec][0x9e][0xac][[0xa9]>[0xe6][0xac][0xdc][0xda][0xc3]v[0x9e]\[0xf1][0x87][0x1d][0xb3][0xd4]}[\r]s[0x93][0xea]:[0x85][0xac][0xad]o[0xa5][0xa7][0xda][0xc6]v[0xcd]r[0xe3]r[0xdb]{[0xf][0xf9][0xe8]G[0xa0]8[0x1d][0xc8][0xe9]X[0x1a][0x96]oo[0xe6][0xf0][0xe4]hdw[0xbd][0x81][0xce][0xd8][0xe1]Q[0xba]r}[0x14][0x17][0xf9][0xe9]R[0xdb]+[0xeb][0xb1][0x9][0xae][0xa5][0x9]lG[0xfc]y[0xc2][0xfc][0xff][0x0][0xdb]V[0x1c][0x9f][0xa0][0xc0][0xfa][0xd4][0xfa]][0xbd][0x99]V[0xb9][0x86]Ss;[0x8c]Iq)[0xcc][0x87][0xd8][0xff][0x0]t{[0xc][\n]"
10:18:29.898 [main] DEBUG org.apache.http.wire - http-outgoing-0 << "/la[0x8c]=[0xe2]N[0xb6]N[0x83]-6p[0xbf][0xf0].[0xdf][0xe7][0xbd][0x0][0x12][0xe9]1[0x6][0x13]Y[0x1f][0xb2]L[0xa3][0x0][0xc6]0[0xa7][0xd8][0x8a][0xa3]q[0xe2][0x1f][0xb1]]&[0x9f]y[0x1]k[0xf9][0x6]cH[0x88][0xda][0xe3][0xfb][0xc4][0x9e][0x10]{[0x9f][0xc0]v[0xa8]m[0xf5][0x9b][0xdb][0xf9][0x8d][0xb4][0xc0][0xe9][0xb0][\r][0xdb]![\r]p=c[0x7][0xee][0xf]v[0xe7][0xd0][0xe][0xb5][0xb3][0x1e][0x97]e[0x14][\r][0x2][[0xa9]G;[0x9c][0xb7][0xcc][0xce][0xbc]X[0xf2]O[0xbd][0x0]g[0xcd][0xa3][\r]Q[0x7][0xf6][0xc9]K[0x84][0xce]E[0xaa]q[\n]"
10:18:29.898 [main] DEBUG org.apache.http.wire - http-outgoing-0 << "[0x9e][0xc4][0xf7]r=O[0x1e][0x83][0xbd]![0x82][0xf3]M[0xff][0x0]PM[0xdd][0xb0][0xff][0x0][0x96]L~u[0x1e][0xc7][0xbf][0xf9][0xe2][0x9b]4[0x9e][0x1f][0x87][0xcf][0xf3]L[0xd6][0xa0][0xe0]B[0xdc][0xc8]O[0xa2][0x1][0xcb][0x1f]a[0xf9]TV[0xf2][0xdc]k[0xd1]y[0x86]F[0xb3][0xb5]=`F[0xfd][0xfb]{9[0x1f]p{/>[0xe3][0x91]T![0xa3]^[0x86][0xf5][0x9e]-5[\r][0xdd][0xc2]q"[0xe7]j[0xc2][0xdb]n[0xc7][0xd8]d[0xfd]:[0xd5][0x9][0xf4][0x3]=[0xca][0xea][0x13][0xcf][0xbe][0xfd]9FU[0xc4]I[0xf4]_[0xfd][0x98][0xe4][0xd6][0x9c][0x9a]%[0xbc]J[\r][0x92][0x8b]9[0x10]|[0xa6]![0x80]~[0xa3][0xbf][0xd7][0xf3][0xcd]R[0x9f][M>h[0xed]5[0x4]"[0xea]Q[0xfb][0x94][0x88]g[0xce][0xfa]z{[0x93][0xc0][0xa6][0x84]0[0xdf][0xb4][0xe]"[0xbe][0x8f][0xc9][0x90][0xf4][0x90]r[0x8f][0xf8][0xf6][0xa8][0xa7][0xbe][[0xad][0xd0]Z[0xc2][0xb7]D[0x1c]31[0xc4]H}[0xdb][0xb9][0xf6]^~[0x95]5[0xde][0x9b]6[0xa5][0x19]]Gj#[0xe5][0xd6]&[0xce][0xdf]~[0xff][0x0]A[0x81][0xf5][0xaa]k[0xc][0xba]J[0x4][0x8d]L[0xb6]H0[0x10][0xf][0x9a]![0xed][0xed][0xfe]x[0xaa][0x17][0xa1]R;)[0xb4][0xd9]E[0xc5][0xc3][0xb6][0xa3][0x18][0xe4][0x6][0x1f][0xea]?[0xdc]^[0x98][0xf7][0xeb][p[0xdd]Gq[0x18][0x96])7[0xa9][0xe7]=[0xc7][0xd6][0xa8][0xc9][0xa9][0xdb])Q[0x11]7[0x12][0xb7][0xdd][0x8a].[[0xf1][0xfe][0xe8][0xf7]8[0xaa][0x12][0xe9]3[0xdc]K[0xf6][0xb6]t[0x8d][0xbb][0xd9][0xa1][0xfd][0xd3][0x8f][0xf6][0xcf][0xf1][0x1f][0xc8]:[0x4]O9[0x96]iK[0xe8]J[0x1e]`q#[0xb7][0x16][0xfe][0xe3]?[0xc4]}[0x87][0xe2]E\[0xd3][0xc5][0xbc][0xb2][0x87][0xbc]-%[0xfc][0xc3]8[0xc0]C[0xdf]b[0xf4][0x3][0xf5][0xf7][0xa7][0xd9]j[0x11]J[0xbe]Q_"H[0xc6][0xc]G[0x8d][0xa3][0xdb][0xda][0xb0][0xb5][0xbf][0x11][0xd8]<Lc[0x1e]a[0x8c][0xfc][0xb3][0x3][0x82][0x8][0xeb][0x83][0xde][0xa2]RQ[0xdc][0xa4][0xae]t:[0xa9][0xb6]xL[0x93]g[0xcc]A[0x95]u?0[0xfc]k[0xc4][0xbc]_;\[0xea][0xef]+[0xfd][0xe2]:[0xe3][0x4][0xfd]k[0xa4][0xd4]|e-[0xc2][0xa9]yp[0x87][0xa2][0xaf];G[0xa9][0xf5]5[0xc2][0xdf][0xdd]}[0xae][0xe9][0xe5][0xc6][0x1]<V[0x1c][0xee]Ob[0xda]I[0x10][0x3][0xcd]z[0x9f][0xc3]]9[0xec]4[0xd9][0xb5][0xb2]b[0x0][0x9c][0x1f]7[0xe5][0x1b]G[0xfb]U[0xe5]Y[0xed]^[0xcb][0xf0][0xc2][0xea][0xc2][0xfb]OH&[0x2]K[0x8b]c[0xf2]$[0x87]*[0xbe][0xea][0xbd]3[0xef][0xd6][0xaa];[0x99][0x9d]][0x96][0xaf]6[0xba][0x84]Y)[0xb2][0x8c]}[0xe9]'_[0xde][0x9f][0xf7]S[0xb0][0xff][0x0]i[0xbf]/[##[0xb2]B[0xd2][0xa0]qt[0xd8][0xdd]v[2[0xb6]:e[0xbb][0x8f]n[0x83][0xb6]*{[0xdb][0x1b]yA[0xb8][0x91][0xfc][0x87][0x8c]n[0xfb]#m[0xa5]~[0xa7][0xd3][0xeb]X[0xf1][0xeb]w[0xd3]H-[0xc0][0x11][[0x13][0x85][0xd4][0xde]3[0xb5][0xff][0x0][0xdc]S[0xd4][0xff][0x0][0xb4]x[0xf6]5[0xa8][0xcb]7z[0xe1][0xd0][0xfc][0xb8][0xb5][0x10]f2[0x9d][0xb0]4[0x3]/![0xf4][0xdb][0xfd]x[0x15]*XI[0xa9][0xed][0x9f]Rdxs[0xba];8[0xdb]tC[0xd0][0xb9][0xff][0x0][0x96][0x87][0xff][0x0][0x1d][0x1e][0x9d][0xea][0xcd][0xbd][0x85][0xb4][0x1][0x99]W[0xcd]yF$[0x9a]S[0xbd][0xe4][0x1e][0xe4][0xf6][0xf6][0x1c]U[0xb][0xf6][0xfe][0xc4][0x2][6,\[0xfc][0xb6] ni[0x8f][0xa2][0xe][0xb9][0xf7][0xe8];[0x9a][0x0][0xb3]>[0x9e][0xd6][0xa5][0xee]l[0xa4]Xp7<nv[0xc0]z[0xfa][0x9e][0x95]B[0xd3]Y[0x9b]Yc[0x1d][0xa2][0xb]0?[0xe5][0xac][0xeb][0x96][0x93][0xde]5[0xe3]#[0xd1][0x8f]^[0xc2][0xa4][0xb3]c[0xad][0x1d][0xfa][0x88][0x9][0xb0][0xe7][0xfb];[0xf8]P[0x8e][0xef][0xfd][0xf3][0xff][0x0][0x8e][0x8f]C[0xd6][0xb4]/`[0xb7][0xb9][0x8c][0x99][0xf0][0xa1][0x6]D[0x99][0xc1]O|[0xd3][0x2][0x98][0xd1][0xad][0x17]{H[0xad]4[0xce]0[0xd3][0xca][0xd9][0x90][0xfe]=[0x87][0xb0][0xc0][0xf6][0xaa][0xd7]Z[0x9f][0xf6][0x2]![0xbb]v[0xb9][0x81][0xce][0xd8][0xf6][0xc][0xcc]O`[0x17][0xf8][0xbf][0xcf]"[0xa9][0x8d]V[0xfa]I6+[0x11][0xa7][0xe7][0x9][0xa9]2d[0xc9][0xfe][0xea][0x9e][0xdf][0xed][0x1c][0x83][0xd8][0x1e][0xb5][0xa3]om[0x4][0x4][0xc8][0x9f][0xbc]w[0x1c][0xcc][0xed][0xbd][0x98][0xbc]{{t[0xa6]+[0x80][0x86]mM[0x4][0xb7]2[0x8]m[0x9c]em[0xe1]|[0x96][0x1f][0xed][0xb8][0xff][0x0][0xd0]W[0x1e][0xe4][0xd4]R[0xd8][0x8][0x8]m<-[0xbb]([0xc0][0x8d]F[0x11][0x87][0xa6]*[0xad][0xfc][0xe3]I[0xcc][0xd6][0xf2][0x5]-[0xff][0x0].[0xdd]|[0xd3][0xe8][0xaa]9[0xcf][0xf9][0xe0]T[0x16][0xf7][0xd2][0xea][0xea]|[0xf2][0xd6][0x91][0xf4]kU8[0x93][0xfe][0x6][0xc3][0xa7][0xd1][0x13][0xda][0x9d][0x80][0x99]5[0xe3]q4[0x96]V[0xd1][0x6][0xbc][0x8b][0x89]C[0x9f][0xdd][0xc4]}[0xc8][0xeb][0xfe][0xe8][0xe7][0xe9]H[0xda]tr[0x93]%[0xd1]73[0x91][0x8f]1[0xc6]6[0xfb] [0x1c]([0xfa]s[0xea]MY[0xfb]%[0xb4][0x91]$K[0x12][0xc4][0xa9][0xf7]<[0xb1][0xb7]o[0xd2][0xb3].u9,[0xee][0x5][0xa6][0xd1]t[0xe7][0x8f]9N[0x16]/[0xfa][0xe8]{}[0x6]I[0xa6]/A..[G[0x88][0xcb]p[0xfb][0xed][0x17][0xf8][0xcf][0xde]OA[0xef]H[0xc][0xba][0xa2][0x7][0x94][0x98]m[0x18]q[\n]"
10:18:29.898 [main] DEBUG org.apache.http.wire - http-outgoing-0 << "[0x9c]<[0x83][0xfd][0xb2]:[0xf][0xf6]G>[0xa7][0xb5]Z[0x8e][0xcd]K-[0xc5][0xc4][0x82][0xe6]\eX[0x8f][0x91]?[0xdc]^[0xdf]^O[0xbd]T[0x9e]$[0xb3]W[0xb8][0x8a]e[0xb7][0x3][0xef][0x6][0xfb][0x8d][0xed][0x8f]_[0xa5]1z[0x12]=[0x9a][\r][0xad]m[0x8b]y[0x14]av[0xc][0xc]zb[0xa9][0x8d]^Yn[0x1a][0xc9][0x4]i2[0x1c]=[0xc3]s[0x12][0xfb][0xf][0xef]7[0xb7]A[0xdf][0xd2][0xa2][0x86][0xf6]]L[0x94][0x99]^[0xc9]?[0xe7][0x89][0xf9]d[0x93][0xdf]?[0xc2]=[0xba][0xfa][0xe3][0xa5]Xu[0x8b][0xca][0x10][0xf9]j#_[0xba][0x80]`[0xf][0xa5];\D[0xa9]m[0xc][0xb]!9[0x96]G[0xff][0x0]Y$[0x9c][0xb3][0xfd]}[0xbd][0x87][0x2][0xb3]n'6[0x3]t[0x4][0xb6][0xe3][0xf2][0xdb][0xf5].[0xd9][0xaa][0xb3]_\B[0xe6][0x1b]?[0xf4][0x88][0xc7][0xe][[0x91][0x17][0xe3][0xdc][0xfb]*t[0xc][0x84][0xb4][0x8a][0xc6]Gn[0x19][0xdb][0xef][0x1f]oa[0xec]8[0xaa][0xb5][0xc4]Ko2[0xde][0xb8][0x9a][0xe8][0x86]u9[[0xe1][0x88][0xfa][0x9f][0xef]7[0xbf]n[0xd5]b[0xe0]$[0xca]L[0xb8][0xc0][0xe7]$[0xe3][0x1e][0xf9][0xaa]7-[0x0][0x0][0xb9]a![0xe1]6[0xc][0xb9]>[0xc3][0xbd]W[\r]q[0xc7][0xf6][0x88][0xf9]s[0xf2]*[0xf2][0xa3][0xfd][0xef]S[0xfa]:~#zG[0xd9][0xb5]i[0xe][0xe9][0x92][0xe3][0xfb][0x17][0xb5][0xab][0x1d][0xb7],=_[0x1c][0xaa][0xff][0x0][0xb0]9[0xf5][0xc7]J[0xe8][0xac][0xe6][0xb6][0x96][0xdd][0x5][0xa6][0xc1][0x12][0x0][0xaa][0x88]6[0xec][0xf6][0xc7]j[0xb1]mu[0x5][0xdc]~d2[0x6]P2{[0x15][0xfa][0xfa]V[\r][0xf5][0xbc][0xfa][0xcc][0xa5][0xf4])~[0xc5][0x83][0xf3][0xea] |[0xaf][0xea][0xa8][0xbf][0xc5][0xee][0xdd][0x7][0xb9][0xae]3quU[0x86]+[0x8c]X[0x7]:[0xab][\r][0xcb][0x14][0x18][0xe4]z[0xc9][0xd9]W[0xdc][0xfe]G[0x81]P[0xd8][0xac][0x8d]:[0x1f][0x11]mk[0xd5]9[0x8d][0xe5][0xd9]=[0xd0]w?[0xed][0x1e]~[0x95]{M[0x92][\r];[0xfd][0xe]x>[0xc9]3[0x1d][0xcd]#[0x1c][0x89][0x8f][0xf7][0x8b][0x9e]I>[0xa4][0xff][0x0][0x85]_[0xd4]f[0xb2][0x82][0xd8][0x9b][0xd2][0xa2]68U#%[0x9b][0xb0]P9'[0xe9][0xcd][0x3][0x1d]4[0x11][0xdc][0xc6]c[0x95][0x4][0x8a][0xdd][0x88][0xcd]ss[0xdd][0xdf]YJ[0xd0]hK[0xfd][0xa1][0x12][0x1c]J\[0x13][0x1d][0xb7][0xd1][0x87][0xdf]?[0xec][0x8f][0xc7][0x1d]hkM[[0x99]2L[0xba]7[0xfc][0xf8][0x87][0xfd][0xfe]=\[0x8e][0x8b][0xfe][0xc8]?Z[0xe8]lf[0xb5][0x96][0xd9][0x5][0xa6][0xc5][0x89][0x6][0x2] [0xc6][0xcf]lv[0xa0]E[0x1d]2[0xd6][0xd2]_[0xf4][0xc1]3][0xdd][0x11][0x86][0x9e]_[0xbe][0x99][0xec][0x17][0xa2][0xf]a[0xf9][0x9a]/[0xb4][0xd8][0x89]k[0xa8][0xe4][0xfb],[0xc8][0x9]3[0x3][0x81][0xff][0x0][0x2][0xf6][0xa8][0xf5][0x8f]"[0xde]P[0xd6][0xa5][0xff][0x0][0xb4][0xd8][0x13][0x14]0[0xc][0xb4][0x9f][0xef][0xe][0x81]}X[0xf1][0xf5][0xe9]T[0xec][0xd6]}Ba[0x1e][0xbf][0xb5]n[0x94][0xe5]l[0xd7][0xfe]=[0xc7][0xa1][0xff][0x0][0xa6][0x87][0xdc][0xf1][0xe8]([0x2][0x94]:[0xed][0xde][0xa1]7[0xd9][0x11]R[0xd4][\r][0xf3][0xa1])0[0xf5][0x89]O_[0xa9][0xe2][0xb4]SH[0xb4]H[0xa4]F[0x8c][0xca][0xd2][0xf3]$[0xb2][0x9d][0xd2]9[0xf5]-[0xfe][0x1c][0xe][0xc2][0xaf]^YGy[0x19][0x8e]d[0xdc][0xa7][0xa7][0xa8][0xfa]V[\r][0xc6][0xa9]>[0x95]q[0xf6][0x4]C[0xce]<[0xdc][0xe1]m[0xfd]<[0xd6][0xe7][0x1f]A[0x96]5B[0x12][0xf2]i48[0x9a]K[0x99][0x4][0x96][0xb][0xc7][0x9a][0xc7][0xe6][0x8b][0xd0][0x1f]QT[0xcd][0xe4][0xfa][0x84]bKbm[0xad][0x9b][0x95][0x95][0x97][0xf7][0x8e]?[0xd9]S[0xf7]~[0xad][0xcf][0xb0][0xef][0xb9][0x16][0x90][0xb3]2[0xdc][0xdd][0xcc]/%[0xc6]Q[0xb1][0xfb][0xb4][0xcf][0xf7][0x17][0xa0][0xfa][0x9c][0x9f]~[0xc2][0xa4][0xfa],[0x96][0xce][0xd2][0xd8][0x8c][0x83][0xcb]#z7[0xd3][0xdf][0xfc][0xfb]U[0xa6]&[0xbb][0x1c][0xfc]ZY[0xb1]v[0x93]M][0xa5][0x8e]dG9[0xf3]O[0xa9]'[0xbf][0xf9][0xe2][0xa7]]N[0x5]S[0xe7]1[0x86]#pb`K[0x13][0xe8][0x7]S[0xf8]U[0xfb];[0xe4][0xd4][0xc3][0xc5][0xa4][0xa2][0xc8][0xf1][0x9d][0xb3]K/[0x11][0xc4]}8[0xe5][0xcf][0xd3][0x8f]R*[0x9e][0xb7]e[0xa6]i[0x8]/[0xef][0xee][0xcf][0xdb][0xc2][0x9f].[0xe9][0xf0][0x8][0xc0][0xfb][0xaa][0x7][\n]"
10:18:29.898 [main] DEBUG org.apache.http.wire - http-outgoing-0 << "[0xbe][0xc3][0xf1]'[0xbb][0xb8][0xb9]L[0xdd]p[0xbc][0xb6][0x12]]][0xff][0x0][0xa0][0xc1][0x10][0xc8][0x1c]y[0xaf][0xe8][0x9][0xe8][0xa0][0xfa]r~[0x9d]+[0xcb]/[0xb5]C4[0xac][0xcd][0xca]tT'[0x85][0x1e][0xd5]{[0xc5]>/[0xb8][0xd7][0xde]4`[0xb1][0xc5][0x8][0xc2][0xaa][0x8c][0x6]=[0xd8][0xd7]0[0xce]X[0xe4][0x9a][0xe6][0x9d][0xa4][0xcb]N[0xc8][0x9a]y[0xcc][0x8d][0x91][0xc0][0xf4][0x15][0x6]i[0xa4][0xd1]RM[0xc7]f[0xb5][0xfc]=[0xab][0xcd][0xa4][0xea]1O[0x13][0x95][0xf9][0x80]>[0xf5][0x8e])[0xca][0xc5]H"[0x98][0x8f][0xa2]t[0x9b][0x85][0xd4][0x4]SkO[0xe6][0xbb][0x10][0xd0][0x3][0xc5][0xba][0xfa]`t-[0xee]J[0xe8][0xe6]H[0xdd][0x18]J[0x14][0xa6]>`[0xdd]1^c[0xe0]/[0x13][0xb][0xab][0xf][0xec][0xdb][0xa8][0x9e][0xe9][0x82][0xfe][0xee]4[0x19]f[0xf6][0x1e][0x9f]\[0xf1]]B[0xd9]_[0xdb][0xbf][0x99][0xa9][0xb7][0xda]l3[0x94][0xb3][0x8c][0xe5]`[0xe7][0x82][0xc7][0xfe]Z[0xe8]#[0xb5]j[0xb5]CB[0xc9]=[0xf2]1[0x1a][\n]"
10:18:29.898 [main] DEBUG org.apache.http.wire - http-outgoing-0 << "[0x99][0xad]2|[0xc9][0xa5][0x19]D[0xf5][0xf2][0x87]W=[0xd9][0xf5]&[0xb5][0xb4][0xb8][0xac][0xf6]5[0xc4][0xe][0xd3]L[0xe3][0x12][0xcd])[0xcc][0xa7][0xd8][0xfa][0xf]a[0xc5]X[0x8a]x[0xe6][0x8c]<L[0x19]1[0xc1][0x1d][0xbd][0xbd][0xab][0x12][0xf1][0xde][0xfa]f}[0xf]h[0xb9]S[0x87][0xbb]o[0xf5][0x3][0xd4][0x1f][0xef][0x9f]a[0xc7][0xa9][0xaa][0x19]{W[T[0xb]+[0xb3][0xa5][0xce]q[0xf][0x92]3#[0x9f]#[0xa3][0xef]OQYP[0x1b][0xab][0x99]U<#[0xa2]1[0xc1][0x86][0xdd]Nboy[0xf]Foo[0xba]=[0xfa][0xd5][0xed]-[0xa3][0x8a]FK[0x80][0xdf][0xda][0x4]bYe[0xe5][0xa4][0xff][0x0]t[0xf4][0xb][0xfe][0xc8][0xe3][0xeb]V5[0x1b][0x9b]H[0xe1][0x9]t7[0xf9][0x87][0x9][0x12][0xae][0xe7][0x90][0xfa]([0x1c][0x93][0xfe]M1[0xb]8[0xc][0xac][0x1c][0x2][0xb8][0xf9][0xb7]t[0xc7][0xbd]r[0xd2][0xbd][0xef][0x98][I[0xdd][0xf6][0x1c][0xe6]I[0x8][0xc9]>[0xbe]P=[0xde][0xe9][0xe9][0x9e][0xd7][0x16][0xda][0xf6]&[0xdd][0xa9][0x82][0xfa]vs[0x1d][0xb0]m[0xc6]?O4[0x8f][0xbd][0xf4][0x1f]([0xf7]5[0xb4][0x1a]9b[0x12]!R[0x98][0xea]:[0x1]LF[0x15][0xa9][0xb7]E2[0xdb][0x82][0xf2]7[0xdf][0x91][0xce][0xe9][0xf][0xd4][0x9f][0xff][0x0]W[0xa5]U[0xbe]h[0x15][0x96]I$0[0xcc]~[0xe1]#K[0xb7][0xb0][0x3][0x93]Rj[0x11]I[0xa9][0xb7][0x99][0xa5]7[0x91][0x83][0xf3]^[0xe3][0xe5]P[0x8b][0xfc]_[0xef][0x1e]>[0xb5]V[0x12][0xb6][0xcc][0xd1]<~T[0xc7][0xab][0xb3]n2{[0xee]=j[0xd1];[0x4]Wws[0xb7][0x97][0xa8][0xb3]Y[0xa1][0xfb][0xa8][0x87][0x6]A[0xfe][0xd3][0xe][0x9f]A[0xf9][0xd6][0x92]<q[0xc6] [0x8e]4X[0xff][0x0][0xb8][0xab][0xc5]f\][0xc4][0x83][0xcb][0x97][0xe7]c[0xd2] 2[0xc7][0xe8]?[0xad]g[0x91]t[0x1f]%[0x99]m;[0xdb]+[0xfc][0xe7][0xea][0xde][0x9e][0xc3][0xf1][0xa7]a[0x17][0xe7][0xb9][0x9a][0xd6]FM0}[0xa2]#~h[0x9][0xfd][0xda]{[0x96][0xed][0xf4][0xeb]R[0xda]<s[0xc8][0xb2][0xcc][0xe6]k[0x95][0xec][0xe3][0x1e]_[0xae][0xd5][0xed][0xf5][0xeb]Iks[0x1][0x89]V[0x1c]*[0xf][0xe0][0x3][0x1b][\n]"
10:18:29.898 [main] DEBUG org.apache.http.wire - http-outgoing-0 << "[0xab]y<S[0x92][0xb6][0xe8]d[0x99]x[0xf3][0x14][0xe0]![0xf7]o[0xe8]9[0xfa]S[0xb0]\[0xb9][0xa8][0x98]<[0xa2][0xd3][0x95][\n]"
10:18:29.899 [main] DEBUG org.apache.http.wire - http-outgoing-0 << ":1<[0x8f][0xa5]a[0xcb]-[0xd3][0x92][0xb3][0xf9][0x8b]g[0xd8][0xf4][0x91][0x87][0xfb]^[0x83][0xf5][0xfa]U[0x88][0x8c][0x96][0xec][0x1e][0xfd][0xcc][0xf2][0xff][0x0][0xc][0xf8][0xf9]G[0xb0][0x1f][0xc3][0xfc][0xea]Y[0xe6][0x8d][0x13]{8[0xda]z[0x1e][0xb9][0xfa]z[0xd5]XC#x[0xc4]ab[\n]"
10:18:29.899 [main] DEBUG org.apache.http.wire - http-outgoing-0 << "[0x10]p[0xa1]x[0x2][0xa9][0xce]|[0xd6]"[0xcf][0x2]q[0xc1][0x93][0xf8][0x17][0xeb][0xeb][0xf4][0x15][0x14][0x96][0xb3][0xcd]'[0x99][0x1e]m[0xe3][0xef][0x1e]pd[0xfa][0xe3][0xee][0x8f][0xf3][0xc5]X[0x8a]U[0x18][0x8b]o[0x94][0xc3][0x80][0x9d][0xbf][\n]"
10:18:29.899 [main] DEBUG org.apache.http.wire - http-outgoing-0 << "7[0x11][0x1d][0xbb]-[0xbb]bp|[0xf2]0eo[0xe2][0xfa]z[0xf]j[0xb3]-[0xc2]*[0xe1][0xf9][0xdc]8Q[0xc9]o[0xa0][0xaa][0xef]/[0x9e]Z(TI[0xd9][0x9d][0xbe][0xe2][0xff][0x0][0x89][0xf6][0x1f][0xa5]2+I,[0x1]e&p[0xdf]y[0x9b][0xef][0xfe][0x1e][0xde][0xd4][0x1][0xeb]w[0x9e][0x17][0xba][0xd5][0xa4][0x17][0x17]W[0x11]Z[0xb2][0x9d][0xdf]f[0xb5][0x7][0xcb][0x93][0xda]F<[0xb8][0xf6][0x0][0x3][0x9e]A[0xad];m#[0xc6][0xcb]k}[0x12][0xdb]J[0x6][0x14][0x8e]#a[0xec]{[0x9f][0xa5]Q[0xb8][0xf1]/[0xf6]5[0xca][0xd8][0xdf][0xa1][0xba][0x9d][0xb8][0x8c][0xdb][0x0][0xcc][0xde][0x1f][0xc3][0xef][0x9c]}[\r]Z[0xb9][0xb1][0xbf][0xd6][0xad][0xcc]wREem [0xfb][0xb6][0xe4]I.=D[0x84]a~[0xa0]~[0x15][0xc4]t[0x89][0xaa][0xdc][0xc5]36[0x9f][0x5][0xb2][0xdf]][0xe3]&2[0xdb]R[0x1c][0xff][0x0][0x14][0x8d][0xfc]?A[0xf3][0x1e][0xc2][0xb3][0xac]t[0x8b][0x8d][0x6]Suq+j[0x99][0x18]2[0xb2][0xe1][0xa0][0x1d][0xd5][0x7][0xf0][0xa7][0xeb][0xea]j[0xe5][0xa5][0x93][0xf8]b[0xdc][[0xc1][0x19][0x9b]ORO[0x1f]}3[0xd4][0x93][0xdf][0xea]J[0xbf].[0xa9]e[0x14][0xb]pg[0xc][0x1d][0xb6][0xa2] [0xdd]#[0xb7][0xf7]B[0x8e]I[0xf6][0xa0]C[0xa1][0xb8][0x86]x[0xbc][0xd8][0xa4][0x5][0x7]$[0xe7][0x1b]~[0xbe][0x95][0xce][0xde][0xc3]u[0xaa][0xca]e[0xf0][0xf3][0x8b]B[0xf][0xcf]|[0xcb][0xfb][0xb9]=U[0x17][0xf8][0x8f][0xfb]_w[0xea]jK[0x9f][0xe][0xde][0xea]3[0xb][0xe7][0xdb]j[0xa3][0x91][0xa6][0xab]f9[0xeb][0xa9][0x1c]1[0xff][0x0]g[0xee][0x8f][0xaf]5[0xb5]e}[0x1d][0xce]ad[0xf2]n#[0x18]h[[0x82]1[0xe9][0xed]#[0x14]4o[0xb3][0xc1][0xbe][0xdc][0xc2]a[0xbc]'3[0x19][0xe][0xe7][0x94][0xff][0x0]x[0xb1][0xe5][0xbf][0xa7]n*[0xc6][0xad][0x15][0x93]Z3[0xdf]2G[0x12][0xcb]RpT[0xfb]{[0xfb]w[0xa8]u[0x99]![0x9d][0xbe][0xc9]o[0x13]\[0xea]*7"[0xc6][0xdb]|[0x9f]Fv[0xfe][0x15][0xfa][0xf2]{[\n]"
10:18:29.899 [main] DEBUG org.apache.http.wire - http-outgoing-0 << "[0xa3][0xa7][0xc5]=[0xad][0xd2][0x1f][0x10]J[0xb7][0x17][0xa3][0xfd]M[0xc6]1[\n]"
10:18:29.899 [main] DEBUG org.apache.http.wire - http-outgoing-0 << "[0xff][0x0][0xb8][0xa7][0xee][0x9f][0xf6][0x8f]>[0xb8][0xe2][0x80]([0xc5]q[0xa9][0xcb]([0xb7][0xd4][0xc][0xf6]zcq[0x15][0xc0]][0xb3][0xcc]?[0xda][0xef][0x18][0xff][0x0][0xc7][0xbf][\n]"
10:18:29.899 [main] DEBUG org.apache.http.wire - http-outgoing-0 << "[0xe8]![0xb3][0xb6][0xb7][0xb6][0x16][0xf0]E[0x1a][0xc1][0x8e][0x11]G[0xca]s[0xdf][0xdf]>[0xbd][0xea][0xdc][0xd0][0xac][0xa8][0xd1][0xc8][0xa1][0xd5][0x87]*GZ[0xe5][0xa5][0xbd][0xbe][0xb5][0x98][0xc3][0xa3][0x8f][0xb4][0xd8][0x6]"k[0xa7][0x1b][0x92][0xdc][0xe7][0x90][0x9f][0xdf]?[0xa0][0xee]sL[0x9]5)[0xff][0x0][0xe1][0x1d][0x2]hKM[0x14][0x8d][0xc5][0x9a][0xfc][0xd2]1[0xff][0x0]`u?[0xd3][0xbd]-[0xba][0xc9][0xae]D&[0xb9]&[0xd8][0xf3][0xf6]8[0xdb][\r][0xf4][0x95][0x87][0xfe][0x82][0xbc]{[0x9a][0xd4][0xd3][0xac][0xad]cSs[0xb][0xb5][0xc4][0xd2][0x8f][0x9e][0xe6]C[0x99][0x1b][0xd8][0xff][0x0]t[0xb2]0[0x7][0xa5]s[0x1f][0x10]o[0xaf]|9`5-"[0x5]II"i[0x98][0xfc][0x8a];|[0xbd][0xd8][0x9f][0xc3][0xf1][0xa7]p0|m[0xe3]=?[0xc3]w[0xa9]k[0xa6][0xc0][0xa6][0xfa]%[0xc3][0x18][0xc8]T[0x8c]vR[0x7][0xb7]j[0xf3][0x1f][0x10][0xf8][0xbb]S[0xf1][0x19]A{(d[0x8c][0x92][0x8a][0xa3][0x0]VM[0xdd][0xdc][0xd7]s[0xc9]<[0xf2][0xb4][0xb2][0xc8][0xc5][0x9d][0xd8][0xe4][0x92]z[0x9a][0xac]Nk7!\S[0xea]i[0xa4][0xd0]i*I[\n]"
......
I couldn't post the full response as its to too large.
I have tried the following but it appears to be null:
HttpEntity httpEntity = httpResponse.getEntity();
String jsonResponse = EntityUtils.toString(httpEntity, StandardCharsets.UTF_8.name());
byte[] imageBytes = org.apache.commons.codec.binary.Base64.decodeBase64(jsonResponse);
BufferedImage img = ImageIO.read(new ByteArrayInputStream(imageBytes));
Is the response a json String or is it just the jpeg bytes? If it's bytes then you shouldn't use a string.
My guess is something like:
HttpEntity httpEntity = httpResponse.getEntity();
BufferedImage img = ImageIO.read(httpEntity.getContent());
I need to use a browser that can be run from Java program and allows to send a custom HTTP request directly and modify any part of the HTTP request. Therefore I chose HtmlUnit.
I tried to make a simple GET request to http://localhost and added an additional header Host:localhost. The page on my localhost home is XAMPP home. Inside the page, there is a request to other site (facebook.com). If the Host header is added, I got 400 Bad Request error. The error doesn't happen if I don't add Host header.
com.gargoylesoftware.htmlunit.ScriptException: Wrapped com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException: 400 Bad Request for http://connect.facebook.net/en_US/all.js#xfbml=1&appId=277385395761685
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:894)
at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:628)
at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:515)
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:775)
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:751)
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:739)
at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptIfPossible(HtmlPage.java:910)
at com.gargoylesoftware.htmlunit.html.HtmlScript.executeInlineScriptIfNeeded(HtmlScript.java:307)
at com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScript.java:368)
at com.gargoylesoftware.htmlunit.html.HtmlScript$2.execute(HtmlScript.java:239)
at com.gargoylesoftware.htmlunit.html.HtmlScript.onAllChildrenAddedToPage(HtmlScript.java:258)
at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:781)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:738)
at net.sourceforge.htmlunit.cyberneko.HTMLTagBalancer.callEndElement(HTMLTagBalancer.java:1243)
at net.sourceforge.htmlunit.cyberneko.HTMLTagBalancer.endElement(HTMLTagBalancer.java:1143)
at net.sourceforge.htmlunit.cyberneko.filters.DefaultFilter.endElement(DefaultFilter.java:226)
at net.sourceforge.htmlunit.cyberneko.filters.NamespaceBinder.endElement(NamespaceBinder.java:345)
at net.sourceforge.htmlunit.cyberneko.HTMLScanner$ContentScanner.scanEndElement(HTMLScanner.java:3154)
at net.sourceforge.htmlunit.cyberneko.HTMLScanner$ContentScanner.scan(HTMLScanner.java:2117)
at net.sourceforge.htmlunit.cyberneko.HTMLScanner.scanDocument(HTMLScanner.java:945)
at net.sourceforge.htmlunit.cyberneko.HTMLConfiguration.parse(HTMLConfiguration.java:521)
at net.sourceforge.htmlunit.cyberneko.HTMLConfiguration.parse(HTMLConfiguration.java:472)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLParser.java:988)
at com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:246)
at com.gargoylesoftware.htmlunit.html.HTMLParser.parseHtml(HTMLParser.java:188)
at com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageCreator.java:267)
at com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java:155)
at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:517)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:391)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:309)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:473)
In HtmlUnit, is all additional headers are applied on all request on the page (not only the first URL)?
How to fix it?
No, additional requests are not applied to other requests.
Below is a complete case, compare it with yours:
index.html:
First
test
index2.html
Second
Test case:
LogManager.getLogger("org.apache.http.wire").setLevel(Level.ALL);
final CollectingAlertHandler handler = new CollectingAlertHandler();
try (final WebClient webClient = new WebClient(BrowserVersion.CHROME)) {
WebRequest request = new WebRequest(new URL("http://localhost:8080"));
request.setAdditionalHeader("Host", "abc.com");
HtmlPage page = webClient.getPage(request);
page.getAnchors().get(0).click();
}
Output:
DEBUG 08:07:31,868 org.apache.http.wire: http-outgoing-0 >> "GET / HTTP/1.1[\r][\n]"
DEBUG 08:07:31,869 org.apache.http.wire: http-outgoing-0 >> "Host: abc.com[\r][\n]"
DEBUG 08:07:31,869 org.apache.http.wire: http-outgoing-0 >> "Connection: Keep-Alive[\r][\n]"
DEBUG 08:07:31,869 org.apache.http.wire: http-outgoing-0 >> "Accept: */*[\r][\n]"
DEBUG 08:07:31,869 org.apache.http.wire: http-outgoing-0 >> "User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36[\r][\n]"
DEBUG 08:07:31,869 org.apache.http.wire: http-outgoing-0 >> "Accept-Encoding: gzip, deflate[\r][\n]"
DEBUG 08:07:31,869 org.apache.http.wire: http-outgoing-0 >> "Accept-Language: en-US[\r][\n]"
DEBUG 08:07:31,870 org.apache.http.wire: http-outgoing-0 >> "[\r][\n]"
DEBUG 08:07:31,873 org.apache.http.wire: http-outgoing-0 << "HTTP/1.1 200 [\r][\n]"
DEBUG 08:07:31,873 org.apache.http.wire: http-outgoing-0 << "Accept-Ranges: bytes[\r][\n]"
DEBUG 08:07:31,873 org.apache.http.wire: http-outgoing-0 << "ETag: W/"37-1491113233075"[\r][\n]"
DEBUG 08:07:31,873 org.apache.http.wire: http-outgoing-0 << "Last-Modified: Sun, 02 Apr 2017 06:07:13 GMT[\r][\n]"
DEBUG 08:07:31,873 org.apache.http.wire: http-outgoing-0 << "Content-Type: text/html[\r][\n]"
DEBUG 08:07:31,873 org.apache.http.wire: http-outgoing-0 << "Content-Length: 37[\r][\n]"
DEBUG 08:07:31,875 org.apache.http.wire: http-outgoing-0 << "Date: Sun, 02 Apr 2017 06:07:31 GMT[\r][\n]"
DEBUG 08:07:31,875 org.apache.http.wire: http-outgoing-0 << "[\r][\n]"
DEBUG 08:07:31,875 org.apache.http.wire: http-outgoing-0 << "First[\r][\n]"
DEBUG 08:07:31,875 org.apache.http.wire: http-outgoing-0 << "test"
DEBUG 08:07:32,172 org.apache.http.wire: http-outgoing-0 >> "GET /index2.html HTTP/1.1[\r][\n]"
DEBUG 08:07:32,172 org.apache.http.wire: http-outgoing-0 >> "Host: localhost:8080[\r][\n]"
DEBUG 08:07:32,172 org.apache.http.wire: http-outgoing-0 >> "Connection: Keep-Alive[\r][\n]"
DEBUG 08:07:32,172 org.apache.http.wire: http-outgoing-0 >> "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8[\r][\n]"
DEBUG 08:07:32,172 org.apache.http.wire: http-outgoing-0 >> "User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36[\r][\n]"
DEBUG 08:07:32,173 org.apache.http.wire: http-outgoing-0 >> "Referer: http://localhost:8080/[\r][\n]"
DEBUG 08:07:32,173 org.apache.http.wire: http-outgoing-0 >> "Accept-Encoding: gzip, deflate[\r][\n]"
DEBUG 08:07:32,173 org.apache.http.wire: http-outgoing-0 >> "Accept-Language: en-US[\r][\n]"
DEBUG 08:07:32,173 org.apache.http.wire: http-outgoing-0 >> "[\r][\n]"
DEBUG 08:07:32,174 org.apache.http.wire: http-outgoing-0 << "HTTP/1.1 200 [\r][\n]"
DEBUG 08:07:32,174 org.apache.http.wire: http-outgoing-0 << "Accept-Ranges: bytes[\r][\n]"
DEBUG 08:07:32,174 org.apache.http.wire: http-outgoing-0 << "ETag: W/"6-1491113144011"[\r][\n]"
DEBUG 08:07:32,174 org.apache.http.wire: http-outgoing-0 << "Last-Modified: Sun, 02 Apr 2017 06:05:44 GMT[\r][\n]"
DEBUG 08:07:32,174 org.apache.http.wire: http-outgoing-0 << "Content-Type: text/html[\r][\n]"
DEBUG 08:07:32,175 org.apache.http.wire: http-outgoing-0 << "Content-Length: 6[\r][\n]"
DEBUG 08:07:32,175 org.apache.http.wire: http-outgoing-0 << "Date: Sun, 02 Apr 2017 06:07:31 GMT[\r][\n]"
DEBUG 08:07:32,175 org.apache.http.wire: http-outgoing-0 << "[\r][\n]"
DEBUG 08:07:32,175 org.apache.http.wire: http-outgoing-0 << "Second"
I want to make asynchronous requests to my server using Unirest.
This is my test code:
public void unirestTest() throws InterruptedException, ExecutionException {
Unirest.get("https://jsonplaceholder.typicode.com/posts/1")
.header(CONTENT_TYPE, APPLICATION_JSON.toString())
.asJsonAsync(new Callback<JsonNode>() {
public void failed(UnirestException e) {
e.printStackTrace();
}
public void completed(HttpResponse<JsonNode> response) {
System.out.println("OK");
}
public void cancelled() {
System.out.println("Request has been canceled.");
}
}
).get();
}
This is what I get in the console:
Connected to the target VM, address: '127.0.0.1:64120', transport: 'socket'
02:09:15.263 [main] DEBUG org.apache.http.impl.nio.client.MainClientExec - [exchange: 1] start execution
02:09:15.294 [main] DEBUG org.apache.http.client.protocol.RequestAddCookies - CookieSpec selected: default
02:09:15.341 [main] DEBUG org.apache.http.client.protocol.RequestAuthCache - Auth cache not set in the context
02:09:15.341 [main] DEBUG org.apache.http.impl.nio.client.InternalHttpAsyncClient - [exchange: 1] Request connection for {s}->https://jsonplaceholder.typicode.com:443
02:09:15.356 [main] DEBUG org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager - Connection request: [route: {s}->https://jsonplaceholder.typicode.com:443][total kept alive: 0; route allocated: 0 of 20; total allocated: 0 of 200]
02:09:16.394 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager - Connection leased: [id: http-outgoing-0][route: {s}->https://jsonplaceholder.typicode.com:443][total kept alive: 0; route allocated: 1 of 20; total allocated: 1 of 200]
02:09:16.394 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.client.InternalHttpAsyncClient - [exchange: 1] Connection allocated: CPoolProxy{http-outgoing-0 [ACTIVE]}
02:09:16.394 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.conn.ManagedNHttpClientConnectionImpl - http-outgoing-0 192.168.189.147:64147<->104.31.86.157:443[ACTIVE][r:]: Set attribute http.nio.exchange-handler
02:09:16.394 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.conn.ManagedNHttpClientConnectionImpl - http-outgoing-0 192.168.189.147:64147<->104.31.86.157:443[ACTIVE][rw:]: Event set [w]
02:09:16.394 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.conn.ManagedNHttpClientConnectionImpl - http-outgoing-0 192.168.189.147:64147<->104.31.86.157:443[ACTIVE][rw:]: Set timeout 0
02:09:16.394 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.client.InternalIODispatch - http-outgoing-0 [ACTIVE]: Connected
02:09:16.394 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.conn.ManagedNHttpClientConnectionImpl - http-outgoing-0 192.168.189.147:64147<->104.31.86.157:443[ACTIVE][rw:]: Set attribute http.nio.http-exchange-state
02:09:16.394 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.client.InternalHttpAsyncClient - Start connection routing
02:09:16.552 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.conn.ManagedNHttpClientConnectionImpl - http-outgoing-0 Upgrade session 192.168.189.147:64147<->104.31.86.157:443[ACTIVE][rw:][ACTIVE][rw][NEED_UNWRAP][0][0][235][0]
02:09:16.553 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.client.MainClientExec - Connection route established
02:09:16.553 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.client.MainClientExec - [exchange: 1] Attempt 1 to execute request
02:09:16.553 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.client.MainClientExec - Target auth state: UNCHALLENGED
02:09:16.554 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.client.MainClientExec - Proxy auth state: UNCHALLENGED
02:09:16.554 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.conn.ManagedNHttpClientConnectionImpl - http-outgoing-0 192.168.189.147:64147<->104.31.86.157:443[ACTIVE][rw:][ACTIVE][rw][NEED_UNWRAP][0][0][235][0]: Set timeout 60000
02:09:16.554 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 >> GET /posts/1 HTTP/1.1
02:09:16.554 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 >> accept-encoding: gzip
02:09:16.555 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 >> Content-Type: application/json; charset=UTF-8
02:09:16.555 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 >> user-agent: unirest-java/1.3.11
02:09:16.555 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 >> Host: jsonplaceholder.typicode.com
02:09:16.555 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 >> Connection: Keep-Alive
02:09:16.556 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.conn.ManagedNHttpClientConnectionImpl - http-outgoing-0 192.168.189.147:64147<->104.31.86.157:443[ACTIVE][rw:][ACTIVE][rw][NEED_UNWRAP][0][0][235][0]: Event set [w]
02:09:16.556 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.client.MainClientExec - [exchange: 1] Request completed
02:09:16.659 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.conn.ManagedNHttpClientConnectionImpl - http-outgoing-0 192.168.189.147:64147<->104.31.86.157:443[ACTIVE][rw:w][ACTIVE][rw][NOT_HANDSHAKING][0][0][217][0]: 188 bytes written
02:09:16.659 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 >> "GET /posts/1 HTTP/1.1[\r][\n]"
02:09:16.659 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 >> "accept-encoding: gzip[\r][\n]"
02:09:16.659 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 >> "Content-Type: application/json; charset=UTF-8[\r][\n]"
02:09:16.659 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 >> "user-agent: unirest-java/1.3.11[\r][\n]"
02:09:16.659 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 >> "Host: jsonplaceholder.typicode.com[\r][\n]"
02:09:16.659 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 >> "Connection: Keep-Alive[\r][\n]"
02:09:16.659 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 >> "[\r][\n]"
02:09:16.660 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.client.InternalIODispatch - http-outgoing-0 [ACTIVE] Request ready
02:09:16.660 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.conn.ManagedNHttpClientConnectionImpl - http-outgoing-0 192.168.189.147:64147<->104.31.86.157:443[ACTIVE][r:w][ACTIVE][r][NOT_HANDSHAKING][0][0][0][0]: Event cleared [w]
02:09:16.716 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.conn.ManagedNHttpClientConnectionImpl - http-outgoing-0 192.168.189.147:64147<->104.31.86.157:443[ACTIVE][r:r][ACTIVE][r][NOT_HANDSHAKING][0][0][0][0]: 887 bytes read
02:09:16.716 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 << "HTTP/1.1 200 OK[\r][\n]"
02:09:16.716 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 << "Date: Thu, 06 Apr 2017 00:09:07 GMT[\r][\n]"
02:09:16.716 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 << "Content-Type: application/json; charset=utf-8[\r][\n]"
02:09:16.716 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 << "Transfer-Encoding: chunked[\r][\n]"
02:09:16.716 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 << "Connection: keep-alive[\r][\n]"
02:09:16.716 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 << "Set-Cookie: __cfduid=dfa98af248364fb21c08736140224a1321491437347; expires=Fri, 06-Apr-18 00:09:07 GMT; path=/; domain=.typicode.com; HttpOnly[\r][\n]"
02:09:16.716 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 << "X-Powered-By: Express[\r][\n]"
02:09:16.716 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 << "Vary: Accept-Encoding[\r][\n]"
02:09:16.716 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 << "Access-Control-Allow-Credentials: true[\r][\n]"
02:09:16.716 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 << "Cache-Control: public, max-age=14400[\r][\n]"
02:09:16.716 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 << "Pragma: no-cache[\r][\n]"
02:09:16.716 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 << "Expires: Thu, 06 Apr 2017 04:09:07 GMT[\r][\n]"
02:09:16.716 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 << "X-Content-Type-Options: nosniff[\r][\n]"
02:09:16.716 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 << "Etag: W/"124-yiKdLzqO5gfBrJFrcdJ8Yq0LGnU"[\r][\n]"
02:09:16.716 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 << "Via: 1.1 vegur[\r][\n]"
02:09:16.716 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 << "CF-Cache-Status: HIT[\r][\n]"
02:09:16.716 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 << "Server: cloudflare-nginx[\r][\n]"
02:09:16.716 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 << "CF-RAY: 34b0843afbaf15dd-FRA[\r][\n]"
02:09:16.716 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 << "Content-Encoding: gzip[\r][\n]"
02:09:16.716 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 << "[\r][\n]"
02:09:16.716 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 << "ca[\r][\n]"
02:09:16.716 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 << "[0x1f][0xffffff8b][0x8][0x0][0x0][0x0][0x0][0x0][0x0][0x3]U[0xffffff8f]Kj[0x4]A[0xc]C[0xfffffff7]s[\n]"
02:09:16.716 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 << "Q[0xffffffeb]l[0xffffffb2][0xffffff9d][0x1b][0xffffffe4][0xe][0xffffffbd]q\[\n]"
02:09:16.716 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 << "c[0xffffffe8][0xfffffffa][0xffffff8c][0xffffffcb][0x1e]&[0xffffff84][0xffffffdc]=tC[0x8][0x1]#$[0xffffff90][0x1f][0xffffffe8][0xffffffeb][0x2][0xffffff94]\[0xfffffff4][0xffffffb7]Z[0xffffffae]x}9[0xffffffa2][0xfffffffd][0xffffffd9][0xffffffb0][0xffffffd8]Y[0xffffffae](+{#2[0xfffffff0]!J'[0xffffff9c][0xffffff93][0xfffffffb].[0xffffff81][0xffffffe9][0xffffffe3]a[0xffffff95]=0T[0xffffff85]*a[0xffffffe0]S9#[0xffffffdd]0f[0xffffffd8]8[0xffffffca][0xffffffce][0x1b]{[0xffffffa5][[0xffffff94][0x13][0xfffffffc]>[0xffffffea][0xffffffe7][0xffffffc1][0xffffffbd][0xffffffa7][0x9][0x18]X[0xffffffb9][0xffffffd4][0xffffffa6][0xffffffc5][0xffffffd6][0x1d][0xffffff9c][0xffffff9a]Kz[0x15]BG_[0xffffffbc]g[0xfffffff6]H[0x7][0xffffff9f][0xffffff93][0xffffffd5][0xffffffe2]|[0xffffffd3]l[[0xffffffff][0xffffff87]G[0x1b];W[0xffffff98][0x10][0x19][0xffffffc7][0xffffffdd]S[0x16]b[0xffffff84][0xffffffb4][0xffffffad][0xfffffff7][0xffffffb1][0xffffffc2][0xffffffb3][0xffffffc1]y([0xffffffd7]9[0xffffff89][\r][0xffffffe7]:g[0x3][0x1f][0xffffffec][0xffffffc6][0xffffff80][0xffffffb8][0xffffffde],[0xffffffa8]1[0xffffffca][0xffffffe5][0xfffffffb][0x7][0x15][0xffffffc6][0xffffff93][0xffffffe8]$[0x1][0x0][0x0][\r][\n]"
02:09:16.731 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 << "0[\r][\n]"
02:09:16.731 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 << "[\r][\n]"
02:09:16.731 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 << HTTP/1.1 200 OK
02:09:16.731 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 << Date: Thu, 06 Apr 2017 00:09:07 GMT
02:09:16.731 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 << Content-Type: application/json; charset=utf-8
02:09:16.731 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 << Transfer-Encoding: chunked
02:09:16.731 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 << Connection: keep-alive
02:09:16.731 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 << Set-Cookie: __cfduid=dfa98af248364fb21c08736140224a1321491437347; expires=Fri, 06-Apr-18 00:09:07 GMT; path=/; domain=.typicode.com; HttpOnly
02:09:16.731 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 << X-Powered-By: Express
02:09:16.731 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 << Vary: Accept-Encoding
02:09:16.731 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 << Access-Control-Allow-Credentials: true
02:09:16.731 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 << Cache-Control: public, max-age=14400
02:09:16.731 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 << Pragma: no-cache
02:09:16.731 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 << Expires: Thu, 06 Apr 2017 04:09:07 GMT
02:09:16.731 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 << X-Content-Type-Options: nosniff
02:09:16.731 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 << Etag: W/"124-yiKdLzqO5gfBrJFrcdJ8Yq0LGnU"
02:09:16.731 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 << Via: 1.1 vegur
02:09:16.731 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 << CF-Cache-Status: HIT
02:09:16.731 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 << Server: cloudflare-nginx
02:09:16.731 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 << CF-RAY: 34b0843afbaf15dd-FRA
02:09:16.731 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 << Content-Encoding: gzip
02:09:16.731 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.client.InternalIODispatch - http-outgoing-0 [ACTIVE(213)] Response received
02:09:16.731 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.client.MainClientExec - [exchange: 1] Response received HTTP/1.1 200 OK
02:09:16.809 [I/O dispatcher 1] DEBUG org.apache.http.client.protocol.ResponseProcessCookies - Cookie accepted [__cfduid="dfa98af248364fb21c08736140224a1321491437347", version:0, domain:typicode.com, path:/, expiry:Fri Apr 06 02:09:07 CEST 2018]
02:09:16.809 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.client.InternalIODispatch - http-outgoing-0 [ACTIVE(213)] Input ready
02:09:16.809 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.client.MainClientExec - [exchange: 1] Consume content
02:09:16.809 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.conn.ManagedNHttpClientConnectionImpl - http-outgoing-0 192.168.189.147:64147<->104.31.86.157:443[ACTIVE][r:r][ACTIVE][r][NOT_HANDSHAKING][0][0][0][0]: 0 bytes read
02:09:16.809 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.conn.ManagedNHttpClientConnectionImpl - http-outgoing-0 192.168.189.147:64147<->104.31.86.157:443[ACTIVE][r:r][ACTIVE][r][NOT_HANDSHAKING][0][0][0][0]: 0 bytes read
02:09:16.809 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.conn.ManagedNHttpClientConnectionImpl - http-outgoing-0 192.168.189.147:64147<->104.31.86.157:443[ACTIVE][r:r][ACTIVE][r][NOT_HANDSHAKING][0][0][0][0]: 0 bytes read
02:09:16.809 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.client.InternalHttpAsyncClient - [exchange: 1] Connection can be kept alive indefinitely
02:09:16.809 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.client.MainClientExec - [exchange: 1] Response processed
02:09:16.809 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.client.InternalHttpAsyncClient - [exchange: 1] releasing connection
02:09:16.809 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.conn.ManagedNHttpClientConnectionImpl - http-outgoing-0 192.168.189.147:64147<->104.31.86.157:443[ACTIVE][r:r][ACTIVE][r][NOT_HANDSHAKING][0][0][0][0]: Remove attribute http.nio.exchange-handler
02:09:16.809 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager - Releasing connection: [id: http-outgoing-0][route: {s}->https://jsonplaceholder.typicode.com:443][total kept alive: 0; route allocated: 1 of 20; total allocated: 1 of 200]
02:09:16.809 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager - Connection [id: http-outgoing-0][route: {s}->https://jsonplaceholder.typicode.com:443] can be kept alive indefinitely
02:09:16.809 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.conn.ManagedNHttpClientConnectionImpl - http-outgoing-0 192.168.189.147:64147<->104.31.86.157:443[ACTIVE][r:r][ACTIVE][r][NOT_HANDSHAKING][0][0][0][0]: Set timeout 0
02:09:16.809 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager - Connection released: [id: http-outgoing-0][route: {s}->https://jsonplaceholder.typicode.com:443][total kept alive: 1; route allocated: 1 of 20; total allocated: 1 of 200]
02:09:20.463 [Thread-1] DEBUG org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager - Closing expired connections
02:09:20.478 [Thread-0] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Closing expired connections
02:09:22.092 [Thread-1] DEBUG org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager - Closing connections idle longer than 30 SECONDS
02:09:22.092 [Thread-0] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Closing connections idle longer than 30 SECONDS
02:09:22.092 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.client.InternalIODispatch - http-outgoing-0 [ACTIVE] Exception
java.lang.RuntimeException: java.lang.RuntimeException: java.util.zip.ZipException: Not in GZIP format
at com.mashape.unirest.http.HttpResponse.<init>(HttpResponse.java:106)
at com.mashape.unirest.http.HttpClientHelper$1.completed(HttpClientHelper.java:82)
at com.mashape.unirest.http.HttpClientHelper$1.completed(HttpClientHelper.java:75)
at org.apache.http.concurrent.BasicFuture.completed(BasicFuture.java:119)
at org.apache.http.impl.nio.client.DefaultClientExchangeHandlerImpl.responseCompleted(DefaultClientExchangeHandlerImpl.java:177)
at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.processResponse(HttpAsyncRequestExecutor.java:436)
at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.inputReady(HttpAsyncRequestExecutor.java:326)
at org.apache.http.impl.nio.client.InternalRequestExecutor.inputReady(InternalRequestExecutor.java:83)
at org.apache.http.impl.nio.DefaultNHttpClientConnection.consumeInput(DefaultNHttpClientConnection.java:265)
at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:81)
at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:39)
at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:121)
at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:162)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:337)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:315)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:276)
at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104)
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:588)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: java.util.zip.ZipException: Not in GZIP format
at com.mashape.unirest.http.HttpResponse.<init>(HttpResponse.java:89)
... 18 common frames omitted
Caused by: java.util.zip.ZipException: Not in GZIP format
at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:165)
at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:79)
at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:91)
at com.mashape.unirest.http.HttpResponse.<init>(HttpResponse.java:85)
... 18 common frames omitted
02:09:22.092 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.conn.ManagedNHttpClientConnectionImpl - http-outgoing-0 192.168.189.147:64147<->104.31.86.157:443[ACTIVE][r:r][ACTIVE][r][NOT_HANDSHAKING][0][0][0][0]: Shutdown
02:09:22.092 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.client.InternalIODispatch - http-outgoing-0 [CLOSED]: Disconnected
java.lang.RuntimeException: java.lang.RuntimeException: java.util.zip.ZipException: Not in GZIP format
at com.mashape.unirest.http.HttpResponse.<init>(HttpResponse.java:106)
at com.mashape.unirest.http.HttpClientHelper$2.get(HttpClientHelper.java:120)
at com.mashape.unirest.http.HttpClientHelper$2.get(HttpClientHelper.java:104)
at SensorHealthCheckerTest.unirestTest(SensorHealthCheckerTest.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:262)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:84)
Caused by: java.lang.RuntimeException: java.util.zip.ZipException: Not in GZIP format
at com.mashape.unirest.http.HttpResponse.<init>(HttpResponse.java:89)
... 25 more
Caused by: java.util.zip.ZipException: Not in GZIP format
at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:165)
at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:79)
at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:91)
at com.mashape.unirest.http.HttpResponse.<init>(HttpResponse.java:85)
... 25 more
Disconnected from the target VM, address: '127.0.0.1:64120', transport: 'socket'
Process finished with exit code -1
I expect this request to be executed without any errors. I noticed that it works with some servers like https://api.ipify.org?format=json but it's not working with mine.
The error says that the response is not in GZIP format. I don't know how to react to this. Should I change somehow expected format in Unirest or add some headers, so the server returns the response in GZIP format? What should I do?
I tried to add header Accept-encoding: gzip to the request but without success.
Here is something you could try see if it could work for you.
I suppose you are receiving response in GZIP format and you could get raw body of the response as InputStream. I am not sure how you'd do that for GZIP but at least this hopefuly could shed some light.
MultipartBody request = Unirest.post("url");
Future<HttpResponse<String>> response = request.asStringAsync(new
Callback<String>() {
#Override
public void failed(UnirestException e) {
//
}
#Override
public void completed(HttpResponse<String> response) {
int code = response.getStatus();
//how about converting the rawbody to GZIP?
InputStream fileBody = response.getRawBody();
}
#Override
public void cancelled() {
//
}
});
I am writing a clojure app that uses Amazon S3. It is using the standard amazonaws library, under this wrapper. For some reason, it is logging to System.out a ton of DEBUG info, including but not limited to the entire binary file I am sending to S3.
As of writing this, I have tried setting up a log4j.properties file:
# Direct log messages to NULL gdmnt
log4j.appender.devnull=org.apache.log4j.varia.NullAppender
log4j.rootLogger=fatal, devnull
log4j.logger.httpclient.wire.header=ERROR
log4j.logger.httpclient.wire.content=ERROR
org.appache.http=ERROR
org.appache.http.wire=ERROR
org.appache.http.headers=ERROR
log4j.logger.com.amazonaws=WARN
log4j.logger.com.amazonaws.request=WARN
log4j.logger.com.amazonaws.http=WARN
log4j.logger.org.apache.http.wire = WARN
Yet it still sends DEBUG info. Yes, log4j is on my classpath. Here is a printout of my classpath filtered for log4j
/Users/collinbell/.m2/repository/org/apache/logging/log4j/log4j-api/2.7/log4j-api-2.7.jar
/Users/collinbell/.m2/repository/org/apache/logging/log4j/log4j-core/2.7/log4j-core-2.7.jar
Here is an example of the logs produced when I send just a simple string to an S3 bucket.
17:53:52.092 [nREPL-worker-0] DEBUG c.a.internal.config.InternalConfig - Configuration override awssdk_config_override.json not found.
17:53:52.126 [nREPL-worker-0] DEBUG c.a.services.s3.internal.S3Signer - Calculated string to sign:
"PUT
text/plain; charset=UTF-8
Tue, 10 Jan 2017 22:53:52 GMT
/eden-cybernetics-voice/key"
17:53:52.225 [nREPL-worker-0] DEBUG com.amazonaws.request - Sending Request: PUT https://eden-cybernetics-voice.s3.amazonaws.com /key Headers: (Authorization: AWS YA,FUCKTHAT=, User-Agent: aws-sdk-java/1.7.5 Mac_OS_X/10.11.5 Java_HotSpot(TM)_64-Bit_Server_VM/25.102-b14/1.8.0_102, Content-Length: 3, Date: Tue, 10 Jan 2017 22:53:52 GMT, Content-Type: text/plain; charset=UTF-8, )
17:53:52.326 [nREPL-worker-0] DEBUG o.a.h.i.c.PoolingClientConnectionManager - Connection request: [route: {s}->https://eden-cybernetics-voice.s3.amazonaws.com:443][total kept alive: 0; route allocated: 0 of 50; total allocated: 0 of 50]
17:53:52.356 [nREPL-worker-0] DEBUG o.a.h.i.c.PoolingClientConnectionManager - Connection leased: [id: 0][route: {s}->https://eden-cybernetics-voice.s3.amazonaws.com:443][total kept alive: 0; route allocated: 1 of 50; total allocated: 1 of 50]
17:53:52.889 [nREPL-worker-0] DEBUG o.a.h.i.c.DefaultClientConnectionOperator - Connecting to eden-cybernetics-voice.s3.amazonaws.com:443
17:53:53.145 [nREPL-worker-0] DEBUG o.a.h.c.protocol.RequestAddCookies - CookieSpec selected: default
17:53:53.147 [nREPL-worker-0] DEBUG o.a.h.c.protocol.RequestAuthCache - Auth cache not set in the context
17:53:53.148 [nREPL-worker-0] DEBUG o.a.h.c.p.RequestProxyAuthentication - Proxy auth state: UNCHALLENGED
17:53:53.149 [nREPL-worker-0] DEBUG c.a.http.impl.client.SdkHttpClient - Attempt 1 to execute request
17:53:53.150 [nREPL-worker-0] DEBUG o.a.h.i.conn.DefaultClientConnection - Sending request: PUT /key HTTP/1.1
17:53:53.151 [nREPL-worker-0] DEBUG org.apache.http.wire - >> "PUT /key HTTP/1.1[\r][\n]"
17:53:53.153 [nREPL-worker-0] DEBUG org.apache.http.wire - >> "Host: eden-cybernetics-voice.s3.amazonaws.com[\r][\n]"
17:53:53.154 [nREPL-worker-0] DEBUG org.apache.http.wire - >> "Authorization: AWS YA, FUCKTHAT=[\r][\n]"
17:53:53.155 [nREPL-worker-0] DEBUG org.apache.http.wire - >> "User-Agent: aws-sdk-java/1.7.5 Mac_OS_X/10.11.5 Java_HotSpot(TM)_64-Bit_Server_VM/25.102-b14/1.8.0_102[\r][\n]"
17:53:53.155 [nREPL-worker-0] DEBUG org.apache.http.wire - >> "Date: Tue, 10 Jan 2017 22:53:52 GMT[\r][\n]"
17:53:53.156 [nREPL-worker-0] DEBUG org.apache.http.wire - >> "Content-Type: text/plain; charset=UTF-8[\r][\n]"
17:53:53.156 [nREPL-worker-0] DEBUG org.apache.http.wire - >> "Content-Length: 3[\r][\n]"
17:53:53.157 [nREPL-worker-0] DEBUG org.apache.http.wire - >> "Connection: Keep-Alive[\r][\n]"
17:53:53.157 [nREPL-worker-0] DEBUG org.apache.http.wire - >> "Expect: 100-continue[\r][\n]"
17:53:53.157 [nREPL-worker-0] DEBUG org.apache.http.wire - >> "[\r][\n]"
17:53:53.158 [nREPL-worker-0] DEBUG org.apache.http.headers - >> PUT /key HTTP/1.1
17:53:53.158 [nREPL-worker-0] DEBUG org.apache.http.headers - >> Host: eden-cybernetics-voice.s3.amazonaws.com
17:53:53.158 [nREPL-worker-0] DEBUG org.apache.http.headers - >> Authorization: AWS YA, I AM NOT SHOWING YOU THIS=
17:53:53.159 [nREPL-worker-0] DEBUG org.apache.http.headers - >> User-Agent: aws-sdk-java/1.7.5 Mac_OS_X/10.11.5 Java_HotSpot(TM)_64-Bit_Server_VM/25.102-b14/1.8.0_102
17:53:53.159 [nREPL-worker-0] DEBUG org.apache.http.headers - >> Date: Tue, 10 Jan 2017 22:53:52 GMT
17:53:53.159 [nREPL-worker-0] DEBUG org.apache.http.headers - >> Content-Type: text/plain; charset=UTF-8
17:53:53.159 [nREPL-worker-0] DEBUG org.apache.http.headers - >> Content-Length: 3
17:53:53.159 [nREPL-worker-0] DEBUG org.apache.http.headers - >> Connection: Keep-Alive
17:53:53.160 [nREPL-worker-0] DEBUG org.apache.http.headers - >> Expect: 100-continue
17:53:53.209 [nREPL-worker-0] DEBUG org.apache.http.wire - << "HTTP/1.1 100 Continue[\r][\n]"
17:53:53.213 [nREPL-worker-0] DEBUG org.apache.http.wire - << "[\r][\n]"
17:53:53.214 [nREPL-worker-0] DEBUG o.a.h.i.conn.DefaultClientConnection - Receiving response: HTTP/1.1 100 Continue
17:53:53.214 [nREPL-worker-0] DEBUG org.apache.http.headers - << HTTP/1.1 100 Continue
17:53:53.215 [nREPL-worker-0] DEBUG org.apache.http.wire - >> "key"
17:53:53.252 [nREPL-worker-0] DEBUG org.apache.http.wire - << "HTTP/1.1 200 OK[\r][\n]"
17:53:53.253 [nREPL-worker-0] DEBUG org.apache.http.wire - << "x-amz-id-2: KxZ8+cp4/BDEm4hdEjaVI/8tUaz0RRh6hcM041BB5pMlHXGXTAjJS3hA3VojH6H4UlleHmD2HSE=[\r][\n]"
17:53:53.253 [nREPL-worker-0] DEBUG org.apache.http.wire - << "x-amz-request-id: F83687CB8CDEB189[\r][\n]"
17:53:53.254 [nREPL-worker-0] DEBUG org.apache.http.wire - << "Date: Tue, 10 Jan 2017 22:53:54 GMT[\r][\n]"
17:53:53.254 [nREPL-worker-0] DEBUG org.apache.http.wire - << "ETag: "3c6e0b8a9c15224a8228b9a98ca1531d"[\r][\n]"
17:53:53.255 [nREPL-worker-0] DEBUG org.apache.http.wire - << "Content-Length: 0[\r][\n]"
17:53:53.256 [nREPL-worker-0] DEBUG org.apache.http.wire - << "Server: AmazonS3[\r][\n]"
17:53:53.257 [nREPL-worker-0] DEBUG org.apache.http.wire - << "[\r][\n]"
17:53:53.258 [nREPL-worker-0] DEBUG o.a.h.i.conn.DefaultClientConnection - Receiving response: HTTP/1.1 200 OK
17:53:53.258 [nREPL-worker-0] DEBUG org.apache.http.headers - << HTTP/1.1 200 OK
17:53:53.258 [nREPL-worker-0] DEBUG org.apache.http.headers - << x-amz-id-2: KxZ8+cp4/BDEm4hdEjaVI/8tUaz0RRh6hcM041BB5pMlHXGXTAjJS3hA3VojH6H4UlleHmD2HSE=
17:53:53.259 [nREPL-worker-0] DEBUG org.apache.http.headers - << x-amz-request-id: F83687CB8CDEB189
17:53:53.259 [nREPL-worker-0] DEBUG org.apache.http.headers - << Date: Tue, 10 Jan 2017 22:53:54 GMT
17:53:53.259 [nREPL-worker-0] DEBUG org.apache.http.headers - << ETag: "3c6e0b8a9c15224a8228b9a98ca1531d"
17:53:53.259 [nREPL-worker-0] DEBUG org.apache.http.headers - << Content-Length: 0
17:53:53.260 [nREPL-worker-0] DEBUG org.apache.http.headers - << Server: AmazonS3
17:53:53.265 [nREPL-worker-0] DEBUG c.a.http.impl.client.SdkHttpClient - Connection can be kept alive indefinitely
17:53:53.276 [nREPL-worker-0] DEBUG com.amazonaws.request - Received successful response: 200, AWS Request ID: F83687CB8CDEB189
17:53:53.277 [nREPL-worker-0] DEBUG o.a.h.i.c.PoolingClientConnectionManager - Connection [id: 0][route: {s}->https://eden-cybernetics-voice.s3.amazonaws.com:443] can be kept alive indefinitely
17:53:53.278 [nREPL-worker-0] DEBUG o.a.h.i.c.PoolingClientConnectionManager - Connection released: [id: 0][route: {s}->https://eden-cybernetics-voice.s3.amazonaws.com:443][total kept alive: 1; route allocated: 1 of 50; total allocated: 1 of 50]
#object[com.amazonaws.services.s3.model.PutObjectResult 0x3822e74d "com.amazonaws.services.s3.model.PutObjectResult#3822e74d"]
17:54:51.712 [java-sdk-http-connection-reaper] DEBUG o.a.h.i.c.PoolingClientConnectionManager - Closing connections idle longer than 60 SECONDS
17:55:51.793 [java-sdk-http-connection-reaper] DEBUG o.a.h.i.c.PoolingClientConnectionManager - Closing connections idle longer than 60 SECONDS
17:55:51.881 [java-sdk-http-connection-reaper] DEBUG o.a.h.i.conn.DefaultClientConnection - Connection 0.0.0.0:61322<->52.216.80.64:443 closed
17:56:51.896 [java-sdk-http-connection-reaper] DEBUG o.a.h.i.c.PoolingClientConnectionManager - Closing connections idle longer than 60 SECONDS
17:57:51.909 [java-sdk-http-connection-reaper] DEBUG o.a.h.i.c.PoolingClientConnectionManager - Closing connections idle longer than 60 SECONDS
17:58:51.918 [java-sdk-http-connection-reaper] DEBUG o.a.h.i.c.PoolingClientConnectionManager - Closing connections idle longer than 60 SECONDS
17:59:51.929 [java-sdk-http-connection-reaper] DEBUG o.a.h.i.c.PoolingClientConnectionManager - Closing connections idle longer than 60 SECOND
My current strategy is to first find out if appache.commons.logging is even using log4j, but I don't know how to do that.
Next, I want to check that log4j is loading in the log4j.properties file.
Is this a good strategy? How do I accomplish it? Do you know another strategy?
S3 under clojure is unusable as is.
Here is my summarized project.clj:
(defproject voice "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:plugins [[lein-cljsbuild "1.1.5"]
[lein-figwheel "0.5.8"]]
:dependencies [[org.clojure/clojure "1.8.0"]
[org.apache.logging.log4j/log4j-core "2.7"]
[org.apache.logging.log4j/log4j-api "2.7"]
;browser repl
[org.clojure/clojurescript "1.9.293"]
[lein-figwheel "0.5.8"]
[figwheel-sidecar "0.5.8"]
;explicitly get the right version
[instaparse "1.4.0"]
;for the trainer
[org.deeplearning4j/deeplearning4j-core "0.7.1"]
[org.deeplearning4j/deeplearning4j-ui_2.10 "0.7.1"]
;[org.nd4j/nd4j-cuda-7.5 "0.7.1"] ;for cuda
[org.nd4j/nd4j-native "0.7.1"]
;for the sampler
[clojure-opennlp "0.3.3"]
[compojure "1.5.1"]
[hiccup "1.0.5"]
[http-kit "2.2.0"]
[garden "1.3.2"]
;;for the sampler client
[jayq "2.5.4"]
[cljs-ajax "0.5.8"]
;for the database
[korma "0.4.3"]
[org.postgresql/postgresql "9.4.1212"]
[clj-aws-s3 "0.3.10" :exclusions [joda-time]]
[org.clojure/data.json "0.2.6"]]
:profiles {:dev {:dependencies [[alembic "0.3.2"]
[org.clojure/tools.nrepl "0.2.10"]
[com.cemerick/piggieback "0.2.1"]]}}
:repl-options {:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]}
:jvm-opts ["-Dlog4j.debug=true"]
:cljsbuild {
:builds [{
:source-paths ["src/cljs/"]
:id "dev"
:figwheel {:websocket-host "localhost"}
:compiler {
:main "voice.sampler"
:asset-path "js/out"
:output-to "resources/public/js/main.js"
:output-dir "resources/public/js/out"}}]})
Here is my fullish classpath:
/Users/collinbell/voice/test/
/Users/collinbell/voice/src/
/Users/collinbell/voice/dev-resources
/Users/collinbell/voice/resources/
/Users/collinbell/voice/target/classes/
/Users/collinbell/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.4.4/jackson-annotations-2.4.4.jar
/Users/collinbell/.m2/repository/org/nd4j/nd4j-jackson/0.7.1/nd4j-jackson-0.7.1.jar
/Users/collinbell/.m2/repository/net/jodah/typetools/0.4.3/typetools-0.4.3.jar
/Users/collinbell/.m2/repository/org/flatland/classlojure/0.7.0/classlojure-0.7.0.jar
/Users/collinbell/.m2/repository/com/mchange/mchange-commons-java/0.2.11/mchange-commons-java-0.2.11.jar
/Users/collinbell/.m2/repository/org/nd4j/jackson/0.7.1/jackson-0.7.1.jar
/Users/collinbell/.m2/repository/lein-as-resource/lein-as-resource/2.5.0/lein-as-resource-2.5.0.jar
/Users/collinbell/.m2/repository/org/apache/commons/commons-lang3/3.3.1/commons-lang3-3.3.1.jar
/Users/collinbell/.m2/repository/ring-cors/ring-cors/0.1.8/ring-cors-0.1.8.jar
/Users/collinbell/.m2/repository/org/clojure/tools.analyzer/0.6.9/tools.analyzer-0.6.9.jar
/Users/collinbell/.m2/repository/com/amazonaws/aws-java-sdk/1.7.5/aws-java-sdk-1.7.5.jar
/Users/collinbell/.m2/repository/ring/ring-core/1.5.0/ring-core-1.5.0.jar
/Users/collinbell/.m2/repository/org/nd4j/nd4j-common/0.7.1/nd4j-common-0.7.1.jar
/Users/collinbell/.m2/repository/org/bytedeco/javacpp-presets/leptonica/1.73-1.2/leptonica-1.73-1.2-macosx-x86_64.jar
/Users/collinbell/.m2/repository/com/typesafe/play/play-functional_2.10/2.4.6/play-functional_2.10-2.4.6.jar
/Users/collinbell/.m2/repository/com/google/jsinterop/jsinterop-annotations/1.0.0/jsinterop-annotations-1.0.0.jar
/Users/collinbell/.m2/repository/org/eclipse/collections/eclipse-collections-api/7.1.0/eclipse-collections-api-7.1.0.jar
/Users/collinbell/.m2/repository/com/typesafe/config/1.3.0/config-1.3.0.jar
/Users/collinbell/.m2/repository/com/stuartsierra/dependency/0.2.0/dependency-0.2.0.jar
/Users/collinbell/.m2/repository/org/bytedeco/javacpp-presets/leptonica/1.73-1.2/leptonica-1.73-1.2.jar
/Users/collinbell/.m2/repository/com/cemerick/piggieback/0.2.1/piggieback-0.2.1.jar
/Users/collinbell/.m2/repository/javax/inject/javax.inject/1/javax.inject-1.jar
/Users/collinbell/.m2/repository/com/fasterxml/jackson/dataformat/jackson-dataformat-cbor/2.5.3/jackson-dataformat-cbor-2.5.3.jar
/Users/collinbell/.m2/repository/org/eclipse/collections/eclipse-collections/7.1.0/eclipse-collections-7.1.0.jar
/Users/collinbell/.m2/repository/org/tukaani/xz/1.5/xz-1.5.jar
/Users/collinbell/.m2/repository/compojure/compojure/1.5.1/compojure-1.5.1.jar
/Users/collinbell/.m2/repository/org/springframework/spring-beans/4.1.6.RELEASE/spring-beans-4.1.6.RELEASE.jar
/Users/collinbell/.m2/repository/com/twelvemonkeys/imageio/imageio-core/3.1.1/imageio-core-3.1.1.jar
/Users/collinbell/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.4.4/jackson-core-2.4.4.jar
/Users/collinbell/.m2/repository/org/slf4j/jul-to-slf4j/1.7.12/jul-to-slf4j-1.7.12.jar
/Users/collinbell/.m2/repository/org/bytedeco/javacpp-presets/opencv/3.1.0-1.2/opencv-3.1.0-1.2-macosx-x86_64.jar
/Users/collinbell/.m2/repository/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar
/Users/collinbell/.m2/repository/org/springframework/spring-context/4.1.6.RELEASE/spring-context-4.1.6.RELEASE.jar
/Users/collinbell/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
/Users/collinbell/.m2/repository/net/cgrand/sjacket/0.1.1/sjacket-0.1.1.jar
/Users/collinbell/.m2/repository/org/eclipse/collections/eclipse-collections-forkjoin/7.1.0/eclipse-collections-forkjoin-7.1.0.jar
/Users/collinbell/.m2/repository/org/apache/httpcomponents/httpclient/4.5.1/httpclient-4.5.1.jar
/Users/collinbell/.m2/repository/org/bytedeco/javacpp-presets/ffmpeg/3.0.2-1.2/ffmpeg-3.0.2-1.2.jar
/Users/collinbell/.m2/repository/org/agrona/Agrona/0.5.4/Agrona-0.5.4.jar
/Users/collinbell/.m2/repository/com/typesafe/play/play-exceptions/2.4.6/play-exceptions-2.4.6.jar
/Users/collinbell/.m2/repository/commons-codec/commons-codec/1.6/commons-codec-1.6.jar
/Users/collinbell/.m2/repository/com/stuartsierra/component/0.3.1/component-0.3.1.jar
/Users/collinbell/.m2/repository/org/apache/directory/studio/org.apache.commons.codec/1.8/org.apache.commons.codec-1.8.jar
/Users/collinbell/.m2/repository/cider/cider-nrepl/0.15.0-SNAPSHOT/cider-nrepl-0.15.0-SNAPSHOT.jar
/Users/collinbell/.m2/repository/org/bytedeco/javacpp-presets/ffmpeg/3.0.2-1.2/ffmpeg-3.0.2-1.2-windows-x86_64.jar
/Users/collinbell/.m2/repository/org/apache/commons/commons-compress/1.8/commons-compress-1.8.jar
/Users/collinbell/.m2/repository/clj-aws-s3/clj-aws-s3/0.3.10/clj-aws-s3-0.3.10.jar
/Users/collinbell/.m2/repository/org/postgresql/postgresql/9.4.1212/postgresql-9.4.1212.jar
/Users/collinbell/.m2/repository/org/bytedeco/javacpp-presets/leptonica/1.73-1.2/leptonica-1.73-1.2-linux-x86_64.jar
/Users/collinbell/.m2/repository/org/ow2/asm/asm-all/4.2/asm-all-4.2.jar
/Users/collinbell/.m2/repository/com/twelvemonkeys/common/common-image/3.1.1/common-image-3.1.1.jar
/Users/collinbell/.m2/repository/garden/garden/1.3.2/garden-1.3.2.jar
/Users/collinbell/.m2/repository/com/twelvemonkeys/imageio/imageio-psd/3.1.1/imageio-psd-3.1.1.jar
/Users/collinbell/.m2/repository/org/nd4j/nd4j-buffer/0.7.1/nd4j-buffer-0.7.1.jar
/Users/collinbell/.m2/repository/io/netty/netty/3.10.4.Final/netty-3.10.4.Final.jar
/Users/collinbell/.m2/repository/com/google/code/gson/gson/2.2.4/gson-2.2.4.jar
/Users/collinbell/.m2/repository/org/apache/httpcomponents/httpcore/4.4.4/httpcore-4.4.4.jar
/Users/collinbell/.m2/repository/org/clojure/data.json/0.2.6/data.json-0.2.6.jar
/Users/collinbell/.m2/repository/org/deeplearning4j/deeplearning4j-core/0.7.1/deeplearning4j-core-0.7.1.jar
/Users/collinbell/.m2/repository/org/clojure/data.priority-map/0.0.7/data.priority-map-0.0.7.jar
/Users/collinbell/.m2/repository/com/twelvemonkeys/imageio/imageio-bmp/3.1.1/imageio-bmp-3.1.1.jar
/Users/collinbell/.m2/repository/cljs-ajax/cljs-ajax/0.5.8/cljs-ajax-0.5.8.jar
/Users/collinbell/.m2/repository/org/clojure/tools.reader/1.0.0-beta3/tools.reader-1.0.0-beta3.jar
/Users/collinbell/.m2/repository/org/tcrawley/dynapath/0.2.5/dynapath-0.2.5.jar
/Users/collinbell/.m2/repository/xerces/xercesImpl/2.11.0/xercesImpl-2.11.0.jar
/Users/collinbell/.m2/repository/org/nd4j/nd4j-api/0.7.1/nd4j-api-0.7.1.jar
/Users/collinbell/.m2/repository/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final.jar
/Users/collinbell/.m2/repository/org/projectlombok/lombok/1.16.10/lombok-1.16.10.jar
/Users/collinbell/.m2/repository/com/yahoo/platform/yui/yuicompressor/2.4.8/yuicompressor-2.4.8.jar
/Users/collinbell/.m2/repository/org/yaml/snakeyaml/1.12/snakeyaml-1.12.jar
/Users/collinbell/.m2/repository/crypto-random/crypto-random/1.2.0/crypto-random-1.2.0.jar
/Users/collinbell/.m2/repository/org/mapdb/elsa/3.0.0-M5/elsa-3.0.0-M5.jar
/Users/collinbell/.m2/repository/org/deeplearning4j/deeplearning4j-ui-model/0.7.1/deeplearning4j-ui-model-0.7.1.jar
/Users/collinbell/.m2/repository/commons-logging/commons-logging/1.2/commons-logging-1.2.jar
/Users/collinbell/.m2/repository/cheshire/cheshire/5.5.0/cheshire-5.5.0.jar
/Users/collinbell/.m2/repository/org/clojure/tools.nrepl/0.2.12/tools.nrepl-0.2.12.jar
/Users/collinbell/.m2/repository/com/google/code/findbugs/annotations/2.0.1/annotations-2.0.1.jar
/Users/collinbell/.m2/repository/org/deeplearning4j/deeplearning4j-nlp/0.7.1/deeplearning4j-nlp-0.7.1.jar
/Users/collinbell/.m2/repository/com/cognitect/transit-java/0.8.311/transit-java-0.8.311.jar
/Users/collinbell/.m2/repository/org/mapdb/mapdb/3.0.2/mapdb-3.0.2.jar
/Users/collinbell/.m2/repository/org/apache/logging/log4j/log4j-core/2.7/log4j-core-2.7.jar
/Users/collinbell/.m2/repository/org/mozilla/rhino/1.7R5/rhino-1.7R5.jar
/Users/collinbell/.m2/repository/strictly-specking-standalone/strictly-specking-standalone/0.1.1/strictly-specking-standalone-0.1.1.jar
/Users/collinbell/.m2/repository/com/typesafe/play/play-iteratees_2.10/2.4.6/play-iteratees_2.10-2.4.6.jar
/Users/collinbell/.m2/repository/com/twelvemonkeys/common/common-io/3.1.1/common-io-3.1.1.jar
/Users/collinbell/.m2/repository/org/nd4j/nd4j-native/0.7.1/nd4j-native-0.7.1.jar
/Users/collinbell/.m2/repository/ch/qos/logback/logback-core/1.1.3/logback-core-1.1.3.jar
/Users/collinbell/.m2/repository/http-kit/http-kit/2.2.0/http-kit-2.2.0.jar
/Users/collinbell/.m2/repository/org/jboss/logging/jboss-logging/3.2.1.Final/jboss-logging-3.2.1.Final.jar
/Users/collinbell/.m2/repository/org/bytedeco/javacpp-presets/leptonica/1.73-1.2/leptonica-1.73-1.2-windows-x86_64.jar
/Users/collinbell/.m2/repository/org/msgpack/msgpack/0.6.10/msgpack-0.6.10.jar
/Users/collinbell/.m2/repository/clojure-opennlp/clojure-opennlp/0.3.3/clojure-opennlp-0.3.3.jar
/Users/collinbell/.m2/repository/net/cgrand/parsley/0.9.3/parsley-0.9.3.jar
/Users/collinbell/.m2/repository/org/hibernate/hibernate-validator/5.0.3.Final/hibernate-validator-5.0.3.Final.jar
/Users/collinbell/.m2/repository/commons-fileupload/commons-fileupload/1.3.1/commons-fileupload-1.3.1.jar
/Users/collinbell/.m2/repository/net/incongru/watchservice/barbary-watchservice/1.0/barbary-watchservice-1.0.jar
/Users/collinbell/.m2/repository/com/google/guava/guava/19.0/guava-19.0.jar
/Users/collinbell/.m2/repository/com/mchange/c3p0/0.9.5.2/c3p0-0.9.5.2.jar
/Users/collinbell/.m2/repository/org/clojure/core.cache/0.6.5/core.cache-0.6.5.jar
/Users/collinbell/.m2/repository/org/bytedeco/javacpp-presets/ffmpeg/3.0.2-1.2/ffmpeg-3.0.2-1.2-linux-x86_64.jar
/Users/collinbell/.m2/repository/org/bytedeco/javacpp-presets/ffmpeg/3.0.2-1.2/ffmpeg-3.0.2-1.2-macosx-x86_64.jar
/Users/collinbell/.m2/repository/net/sf/jwordnet/jwnl/1.3.3/jwnl-1.3.3.jar
/Users/collinbell/.m2/repository/org/scala-lang/modules/scala-java8-compat_2.10/0.3.0/scala-java8-compat_2.10-0.3.0.jar
/Users/collinbell/.m2/repository/org/apache/httpcomponents/httpasyncclient/4.1.1/httpasyncclient-4.1.1.jar
/Users/collinbell/.m2/repository/com/twelvemonkeys/imageio/imageio-jpeg/3.1.1/imageio-jpeg-3.1.1.jar
/Users/collinbell/.m2/repository/clout/clout/2.1.2/clout-2.1.2.jar
/Users/collinbell/.m2/repository/clj-stacktrace/clj-stacktrace/0.2.8/clj-stacktrace-0.2.8.jar
/Users/collinbell/.m2/repository/com/typesafe/play/twirl-api_2.10/1.1.1/twirl-api_2.10-1.1.1.jar
/Users/collinbell/.m2/repository/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.jar
/Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home/src.zip
/Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home/lib/tools.jar
/Users/collinbell/.m2/repository/org/apache/logging/log4j/log4j-api/2.7/log4j-api-2.7.jar
This isnt an answer but I cant comment with my low reputation :(. The spelling for the 'apache' namespace seems to be wrong in the config
org.appache.http=ERROR
org.appache.http.wire=ERROR
org.appache.http.headers=ERROR
I had the same issue,
creating a logback.xml and putting it on classpath with below config fixed it:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<logger name="org.apache" level="ERROR" />
<logger name="httpclient" level="ERROR" />
</configuration>
Hope it helps the others.