I have a client using HTTPClient 4.1.2 communicating to a web service that returns XML. It works fine with DefaultHTTPClient, but when I want to use ContentEncodingHttpClient, connections are not reused after release.
With DefaultHTTPClient: 12:47:27.567 [pool-1-thread-1] DEBUG o.a.h.i.conn.DefaultClientConnection - Receiving response: HTTP/1.1 200 OK 12:47:27.567 [pool-1-thread-1] DEBUG org.apache.http.headers - << HTTP/1.1 200 OK 12:47:27.567 [pool-1-thread-1] DEBUG org.apache.http.headers - << Date: Fri, 16 Dec 2011 12:47:27 GMT 12:47:27.567 [pool-1-thread-1] DEBUG org.apache.http.headers - << Server: Apache 12:47:27.567 [pool-1-thread-1] DEBUG org.apache.http.headers - << X-IGApacheDebug: platform=TEST instance=httpd-ip1, vhost=DEFAULT:8145 on vrtsttmi111.iggroup.local 12:47:27.567 [pool-1-thread-1] DEBUG org.apache.http.headers - << Vary: X-Forwarded-For,Accept-Encoding 12:47:27.567 [pool-1-thread-1] DEBUG org.apache.http.headers - << Status: 200 12:47:27.567 [pool-1-thread-1] DEBUG org.apache.http.headers - << Content-Language: en-GB 12:47:27.567 [pool-1-thread-1] DEBUG org.apache.http.headers - << Content-Length: 2599 12:47:27.567 [pool-1-thread-1] DEBUG org.apache.http.headers - << Keep-Alive: timeout=3, max=89 12:47:27.567 [pool-1-thread-1] DEBUG org.apache.http.headers - << Connection: Keep-Alive 12:47:27.567 [pool-1-thread-1] DEBUG org.apache.http.headers - << Content-Type: application/xml;charset=ISO-8859-1 12:47:27.567 [pool-1-thread-1] DEBUG o.a.h.impl.client.DefaultHttpClient - Connection can be kept alive for 3000 MILLISECONDS 12:47:27.567 [pool-1-thread-1] DEBUG org.apache.http.wire - << "<?xml version="1.0"?><permissionInstrument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><ViewPermission>L1</ViewPermission>" 12:47:27.567 [pool-1-thread-1] DEBUG o.a.h.i.c.t.ThreadSafeClientConnManager - Released connection is reusable. 12:47:27.567 [pool-1-thread-1] DEBUG o.a.h.i.conn.tsccm.ConnPoolByRoute - Releasing connection [HttpRoute[{}->http://ip1]][null] 12:47:27.567 [pool-1-thread-1] DEBUG o.a.h.i.conn.tsccm.ConnPoolByRoute - Pooling connection [HttpRoute[{}->http://ip1]][null]; keep alive for 3000 MILLISECONDS With ContentEncodingHttpClient: 12:36:20.150 [pool-1-thread-7] DEBUG o.a.h.i.conn.DefaultClientConnection - Receiving response: HTTP/1.1 200 OK 12:36:20.150 [pool-1-thread-7] DEBUG org.apache.http.headers - << HTTP/1.1 200 OK 12:36:20.150 [pool-1-thread-7] DEBUG org.apache.http.headers - << Date: Fri, 16 Dec 2011 12:36:20 GMT 12:36:20.150 [pool-1-thread-7] DEBUG org.apache.http.headers - << Server: Apache 12:36:20.150 [pool-1-thread-7] DEBUG org.apache.http.headers - << X-IGApacheDebug: platform=TEST instance=httpd-ip1, vhost=DEFAULT:8145 on vrtsttmi112.iggroup.local 12:36:20.150 [pool-1-thread-7] DEBUG org.apache.http.headers - << Vary: X-Forwarded-For,Accept-Encoding 12:36:20.150 [pool-1-thread-7] DEBUG org.apache.http.headers - << Status: 200 12:36:20.151 [pool-1-thread-7] DEBUG org.apache.http.headers - << Content-Language: en-GB 12:36:20.151 [pool-1-thread-7] DEBUG org.apache.http.headers - << Content-Encoding: gzip 12:36:20.151 [pool-1-thread-7] DEBUG org.apache.http.headers - << Content-Length: 919 12:36:20.151 [pool-1-thread-7] DEBUG org.apache.http.headers - << Keep-Alive: timeout=3, max=100 12:36:20.151 [pool-1-thread-7] DEBUG org.apache.http.headers - << Connection: Keep-Alive 12:36:20.151 [pool-1-thread-7] DEBUG org.apache.http.headers - << Content-Type: application/xml;charset=ISO-8859-1 12:36:27.122 [pool-1-thread-7] DEBUG org.apache.http.wire - << "[0x1f]" 12:36:27.123 [pool-1-thread-7] DEBUG org.apache.http.wire - << "[0x8b]" 12:36:27.123 [pool-1-thread-7] DEBUG org.apache.http.wire - << "[0x8]" 12:36:27.123 [pool-1-thread-7] DEBUG org.apache.http.wire - << "[0x0]" 12:36:27.123 [pool-1-thread-7] DEBUG org.apache.http.wire - << "[0x0][0x0][0x0][0x0][0x0][0x3]" 12:36:27.125 [pool-1-thread-7] DEBUG org.apache.http.wire - << "[0xd5]V][0x8f][0x9b]:[0x10]}[0xbf]R[0xff][0x3][0xda][0xf6][0xb5][0x18][0xb6][0xf7][0xe9][0xfe][0xfc]a[0xa7];[0xba][0xf7][0x1a]$~[0xf0]\[0xd4]"G9@[0xfd]&[\n]" 12:36:27.127 [pool-1-thread-7] DEBUG org.apache.http.wire - << "[0x1e][0xdf][0x81],A[0x11]ly\D[0xa7][0xe8][0xbe]w,E[0x2][0xbe][0xc4]n[0xb2][0xc1][0xf6]BX[0xbb]W3[\n]" 12:36:27.127 [pool-1-thread-7] DEBUG org.apache.http.wire - << "[0xfb][0xf3]U[0xb9][0xaf]?OZ[0xe9][0xf7]e$BP[0xc6]{cukT[0xcf][0x1d][0x97][0x91][0x81]/[0xf][0x92]TMa\[0xc0][0xf7][0x8d]Y[0xba][0xbc]z@[0xc9]1&9[0xf7][0xe5][0xc7][0xde][0xfc][0xf6][0x1f][0xaa]o[0xab]t'[\n]" 12:36:27.127 [pool-1-thread-7] DEBUG org.apache.http.wire - << "[0x0][0x0]" 12:36:27.129 [pool-1-thread-7] DEBUG o.a.h.i.conn.DefaultClientConnection - Connection shut down 12:36:27.129 [pool-1-thread-7] DEBUG o.a.h.i.c.t.ThreadSafeClientConnManager - Released connection is not reusable. Is this a bug, or is there something about GZIP compression that causes the connections to be non reusable? -- View this message in context: http://old.nabble.com/GZIP-compression-don%27t-reuse-connections-tp32987666p32987666.html Sent from the HttpClient-User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
