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"
Related
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 am trying to create some tests for my Spring web app. I have some test classes which use MockMvc and a Cucumber test class using Selenium. All tests perform CRUD operations connected to an InProcessServer instance.
When running the tests using Gradle the MockMvc test classes run and pass but when the Cucumber test steps are executed I am getting the following:
2015-09-17 16:44:05 DEBUG org.apache.http.wire - http-outgoing-3 >> "POST /db/data/transaction/commit HTTP/1.1[\r][\n]"
2015-09-17 16:44:05 DEBUG org.apache.http.wire - http-outgoing-3 >> "Content-Type: application/json;charset=UTF-8[\r][\n]"
2015-09-17 16:44:05 DEBUG org.apache.http.wire - http-outgoing-3 >> "Accept: application/json;charset=UTF-8[\r][\n]"
2015-09-17 16:44:05 DEBUG org.apache.http.wire - http-outgoing-3 >> "User-Agent: neo4j-ogm.java/1.0[\r][\n]"
2015-09-17 16:44:05 DEBUG org.apache.http.wire - http-outgoing-3 >> "Content-Length: 131[\r][\n]"
2015-09-17 16:44:05 DEBUG org.apache.http.wire - http-outgoing-3 >> "Host: localhost:7478[\r][\n]"
2015-09-17 16:44:05 DEBUG org.apache.http.wire - http-outgoing-3 >> "Connection: Keep-Alive[\r][\n]"
2015-09-17 16:44:05 DEBUG org.apache.http.wire - http-outgoing-3 >> "Accept-Encoding: gzip,deflate[\r][\n]"
2015-09-17 16:44:05 DEBUG org.apache.http.wire - http-outgoing-3 >> "[\r][\n]"
2015-09-17 16:44:05 DEBUG org.apache.http.wire - http-outgoing-3 >> "{"statements":[{"statement":"MATCH (n:`User`) RETURN COUNT(n)","parameters":{},"resultDataContents":["row"],"includeStats":false}]}"
2015-09-17 16:44:05 DEBUG org.apache.http.wire - http-outgoing-3 << "HTTP/1.1 404 Not Found[\r][\n]"
2015-09-17 16:44:05 DEBUG org.apache.http.wire - http-outgoing-3 << "Date: Thu, 17 Sep 2015 15:44:05 GMT[\r][\n]"
2015-09-17 16:44:05 DEBUG org.apache.http.wire - http-outgoing-3 << "Cache-Control: must-revalidate,no-cache,no-store[\r][\n]"
2015-09-17 16:44:05 DEBUG org.apache.http.wire - http-outgoing-3 << "Content-Type: text/html; charset=ISO-8859-1[\r][\n]"
2015-09-17 16:44:05 DEBUG org.apache.http.wire - http-outgoing-3 << "Content-Length: 304[\r][\n]"
2015-09-17 16:44:05 DEBUG org.apache.http.wire - http-outgoing-3 << "Server: Jetty(9.2.4.v20141103)[\r][\n]"
2015-09-17 16:44:05 DEBUG org.apache.http.wire - http-outgoing-3 << "[\r][\n]"
2015-09-17 16:44:05 DEBUG org.apache.http.wire - http-outgoing-3 << "<html>[\n]"
2015-09-17 16:44:05 DEBUG org.apache.http.wire - http-outgoing-3 << "<head>[\n]"
2015-09-17 16:44:05 DEBUG org.apache.http.wire - http-outgoing-3 << "<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>[\n]"
2015-09-17 16:44:05 DEBUG org.apache.http.wire - http-outgoing-3 << "<title>Error 404 </title>[\n]"
2015-09-17 16:44:05 DEBUG org.apache.http.wire - http-outgoing-3 << "</head>[\n]"
2015-09-17 16:44:05 DEBUG org.apache.http.wire - http-outgoing-3 << "<body>[\n]"
2015-09-17 16:44:05 DEBUG org.apache.http.wire - http-outgoing-3 << "<h2>HTTP ERROR: 404</h2>[\n]"
2015-09-17 16:44:05 DEBUG org.apache.http.wire - http-outgoing-3 << "<p>Problem accessing /db/data/transaction/commit. Reason:[\n]"
2015-09-17 16:44:05 DEBUG org.apache.http.wire - http-outgoing-3 << "<pre> Not Found</pre></p>[\n]"
2015-09-17 16:44:05 DEBUG org.apache.http.wire - http-outgoing-3 << "<hr /><i><small>Powered by Jetty://</small></i>[\n]"
2015-09-17 16:44:05 DEBUG org.apache.http.wire - http-outgoing-3 << "</body>[\n]"
2015-09-17 16:44:05 DEBUG org.apache.http.wire - http-outgoing-3 << "</html>[\n]"
2015-09-17 16:44:05 INFO o.s.d.n.config.Neo4jConfiguration - Intercepted exception
What could be causing this? This must be the Neo4j server as there is no server running on port 7478 after the tests complete and it is also not the test web server as this is configured on a random port e.g.
2015-09-17 16:44:04 INFO o.s.b.c.e.j.JettyEmbeddedServletContainer - Jetty started on port(s) 37837 (http/1.1)
EDIT:
#Configuration
#EnableNeo4jRepositories(basePackages = "co.sens.data.repositories")
#EnableTransactionManagement
#ComponentScan("co.sens.data")
public class Neo4jTestConfiguration extends Neo4jConfiguration {
#Override
public SessionFactory getSessionFactory() {
return new SessionFactory("co.sens.data");
}
#Bean
#Override
public Neo4jServer neo4jServer() {
return new InProcessServer();
}
#Override
#Bean
public Session getSession() throws Exception {
return super.getSession();
}
}
I have a problem using the file upload Box API. I'm using Java with the Apache HttpClient (4.4). As far as I can tell, I am setting everything correctly, but I always get a 400 Bad request response.
I can provide more details if necessary, but here is the debug output that includes the request and response data as seen by the HttpClient:
http-outgoing-2 >> POST /api/2.0/files/content HTTP/1.1
http-outgoing-2 >> Authorization: Bearer taMJdbLcm1gJmTdnUUctqU53lpRXlVEi
http-outgoing-2 >> Content-Length: 506
http-outgoing-2 >> Content-Type: multipart/form-data; boundary=NMMQjAsnXwlKj02hT5qkfGNSn7hoOE1T1nGpaV52
http-outgoing-2 >> Host: upload.box.com
http-outgoing-2 >> Connection: Keep-Alive
http-outgoing-2 >> User-Agent: Apache-HttpClient/4.4 (Java 1.5 minimum; Java/1.7.0_79)
http-outgoing-2 >> Cookie: box_visitor_id=55b9188c8618a3.22188589
http-outgoing-2 >> Accept-Encoding: gzip,deflate
http-outgoing-2 >> "POST /api/2.0/files/content HTTP/1.1[\r][\n]"
http-outgoing-2 >> "Authorization: Bearer taMJdbLcm1gJmTdnUUctqU53lpRXlVEi[\r][\n]"
http-outgoing-2 >> "Content-Length: 506[\r][\n]"
http-outgoing-2 >> "Content-Type: multipart/form-data; boundary=NMMQjAsnXwlKj02hT5qkfGNSn7hoOE1T1nGpaV52[\r][\n]"
http-outgoing-2 >> "Host: upload.box.com[\r][\n]"
http-outgoing-2 >> "Connection: Keep-Alive[\r][\n]"
http-outgoing-2 >> "User-Agent: Apache-HttpClient/4.4 (Java 1.5 minimum; Java/1.7.0_79)[\r][\n]"
http-outgoing-2 >> "Cookie: box_visitor_id=55b9188c8618a3.22188589[\r][\n]"
http-outgoing-2 >> "Accept-Encoding: gzip,deflate[\r][\n]"
http-outgoing-2 >> "[\r][\n]"
http-outgoing-2 >> "--NMMQjAsnXwlKj02hT5qkfGNSn7hoOE1T1nGpaV52[\r][\n]"
http-outgoing-2 >> "Content-Disposition: form-data; name="attributes"[\r][\n]"
http-outgoing-2 >> "Content-Type: text/plain; charset=US-ASCII[\r][\n]"
http-outgoing-2 >> "Content-Transfer-Encoding: 8bit[\r][\n]"
http-outgoing-2 >> "[\r][\n]"
http-outgoing-2 >> "{"name":"This-is-a-Temp-File1438193805638", "parent":{"id":"4108964579"}}"
http-outgoing-2 >> "[\r][\n]"
http-outgoing-2 >> "--NMMQjAsnXwlKj02hT5qkfGNSn7hoOE1T1nGpaV52[\r][\n]"
http-outgoing-2 >> "Content-Disposition: form-data; name="file"[\r][\n]"
http-outgoing-2 >> "Content-Type: application/octet-stream[\r][\n]"
http-outgoing-2 >> "Content-Transfer-Encoding: binary[\r][\n]"
http-outgoing-2 >> "[\r][\n]"
http-outgoing-2 >> "this is a test file for upload1438193805640"
http-outgoing-2 >> "[\r][\n]"
http-outgoing-2 >> "--NMMQjAsnXwlKj02hT5qkfGNSn7hoOE1T1nGpaV52--[\r][\n]"
http-outgoing-2 << "HTTP/1.1 400 Bad Request[\r][\n]"
http-outgoing-2 << "Content-Type: text/html;charset=UTF-8[\r][\n]"
http-outgoing-2 << "Content-Length: 0[\r][\n]"
http-outgoing-2 << "Date: Wed, 29 Jul 2015 18:16:45 GMT[\r][\n]"
http-outgoing-2 << "Age: 0[\r][\n]"
http-outgoing-2 << "Connection: keep-alive[\r][\n]"
http-outgoing-2 << "Server: ATS[\r][\n]"
http-outgoing-2 << "[\r][\n]"
http-outgoing-2 << HTTP/1.1 400 Bad Request
http-outgoing-2 << Content-Type: text/html;charset=UTF-8
http-outgoing-2 << Content-Length: 0
http-outgoing-2 << Date: Wed, 29 Jul 2015 18:16:45 GMT
http-outgoing-2 << Age: 0
http-outgoing-2 << Connection: keep-alive
http-outgoing-2 << Server: ATS
Can anyone see where the problem lies? Thanks for any help, Martin
In your second mime chunk you have said the content type is binary but your data is actually text. This could be one issue with the request.
I am using the was-sdk-java.
Recently I get huge amount of debug data, a snapshot below, and it completely bugs down my system (as each line item is longer). Even the binary data appears.
2015-03-01 17:10:44,644 DEBUG ~ CookieSpec selected: best-match
2015-03-01 17:10:44,644 DEBUG ~ Auth cache not set in the context
2015-03-01 17:10:44,644 DEBUG ~ Proxy auth state: UNCHALLENGED
2015-03-01 17:10:44,644 DEBUG ~ Sending request: GET /app1/xxx HTTP/1.1
2015-03-01 17:10:44,644 DEBUG ~ >> "GET /app1/xxx HTTP/1.1[\r][\n]"
2015-03-01 17:10:44,645 DEBUG ~ >> "Host: testcerts.xxx.eu[\r][\n]"
2015-03-01 17:10:44,645 DEBUG ~ >> "Authorization: AWS xxx:xxx[\r][\n]"
2015-03-01 17:10:44,645 DEBUG ~ >> "Date: Sun, 01 Mar 2015 17:10:44 GMT[\r][\n]"
2015-03-01 17:10:44,645 DEBUG ~ >> "User-Agent: aws-sdk-java/1.7.13 Linux/3.13.0-46-generic OpenJDK_64-Bit_Server_VM/24.75-b04/1.7.0_75[\r][\n]"
2015-03-01 17:10:44,645 DEBUG ~ >> "Content-Type: application/x-www-form-urlencoded; charset=utf-8[\r][\n]"
2015-03-01 17:10:44,645 DEBUG ~ >> "Connection: Keep-Alive[\r][\n]"
2015-03-01 17:10:44,645 DEBUG ~ >> "[\r][\n]"
2015-03-01 17:10:44,646 DEBUG ~ >> GET /app1/xxx HTTP/1.1
2015-03-01 17:10:44,646 DEBUG ~ >> Host: testcerts.xxx
2015-03-01 17:10:44,646 DEBUG ~ >> Authorization: AWS xxx:xxx
2015-03-01 17:10:44,646 DEBUG ~ >> Date: Sun, 01 Mar 2015 17:10:44 GMT
2015-03-01 17:10:44,646 DEBUG ~ >> User-Agent: aws-sdk-java/1.7.13 Linux/3.13.0-46-generic OpenJDK_64-Bit_Server_VM/24.75-b04/1.7.0_75
2015-03-01 17:10:44,646 DEBUG ~ >> Content-Type: application/x-www-form-urlencoded; charset=utf-8
2015-03-01 17:10:44,646 DEBUG ~ >> Connection: Keep-Alive
2015-03-01 17:10:44,655 DEBUG ~ << "HTTP/1.1 200 OK[\r][\n]"
2015-03-01 17:10:44,656 DEBUG ~ << "Server: nginx[\r][\n]"
2015-03-01 17:10:44,656 DEBUG ~ << "Date: Sun, 01 Mar 2015 17:10:44 GMT[\r][\n]"
2015-03-01 17:10:44,656 DEBUG ~ << "Content-Type: application/x-pkcs12[\r][\n]"
2015-03-01 17:10:44,656 DEBUG ~ << "Content-Length: 3249[\r][\n]"
2015-03-01 17:10:44,656 DEBUG ~ << "Connection: keep-alive[\r][\n]"
2015-03-01 17:10:44,656 DEBUG ~ << "Bucket: "testcerts"[\r][\n]"
2015-03-01 17:10:44,657 DEBUG ~ << "Accept-Ranges: bytes[\r][\n]"
2015-03-01 17:10:44,657 DEBUG ~ << "Last-Modified: Fri, 23 Jan 2015 10:04:12 GMT[\r][\n]"
2015-03-01 17:10:44,657 DEBUG ~ << "ETag: "xxx"[\r][\n]"
2015-03-01 17:10:44,657 DEBUG ~ << "Age: 0[\r][\n]"
2015-03-01 17:10:44,658 DEBUG ~ << "X-Cache-Hit: No[\r][\n]"
2015-03-01 17:10:44,658 DEBUG ~ << "Accept-Ranges: bytes[\r][\n]"
2015-03-01 17:10:44,658 DEBUG ~ << "[\r][\n]"
2015-03-01 17:10:44,658 DEBUG ~ Receiving response: HTTP/1.1 200 OK
2015-03-01 17:10:44,658 DEBUG ~ << HTTP/1.1 200 OK
2015-03-01 17:10:44,659 DEBUG ~ << Server: nginx
2015-03-01 17:10:44,659 DEBUG ~ << Date: Sun, 01 Mar 2015 17:10:44 GMT
2015-03-01 17:10:44,659 DEBUG ~ << Content-Type: application/x-pkcs12
2015-03-01 17:10:44,659 DEBUG ~ << Content-Length: 3249
2015-03-01 17:10:44,659 DEBUG ~ << Connection: keep-alive
2015-03-01 17:10:44,659 DEBUG ~ << Bucket: "testcerts"
2015-03-01 17:10:44,660 DEBUG ~ << Accept-Ranges: bytes
2015-03-01 17:10:44,660 DEBUG ~ << Last-Modified: Fri, 23 Jan 2015 10:04:12 GMT
2015-03-01 17:10:44,660 DEBUG ~ << ETag: "xxx"
2015-03-01 17:10:44,660 DEBUG ~ << Age: 0
2015-03-01 17:10:44,660 DEBUG ~ << X-Cache-Hit: No
2015-03-01 17:10:44,660 DEBUG ~ << Accept-Ranges: bytes
I tried to turn this off in log4j, as debugging of the whole application is now impossible:
log4j.logger.httpclient.wire=INFO
log4j.logger.com.amazonaws=WARN
log4j.logger.com.amazonaws.request=WARN
But this doesn't seem to make any difference. Any suggestion why I suddenly get all these log warning, and what I can do about it?
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.