Return-Path: Delivered-To: apmail-hc-httpclient-users-archive@www.apache.org Received: (qmail 69448 invoked from network); 29 Mar 2011 20:24:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 29 Mar 2011 20:24:04 -0000 Received: (qmail 3110 invoked by uid 500); 29 Mar 2011 20:24:04 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 3083 invoked by uid 500); 29 Mar 2011 20:24:04 -0000 Mailing-List: contact httpclient-users-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-users@hc.apache.org Received: (qmail 3075 invoked by uid 99); 29 Mar 2011 20:24:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Mar 2011 20:24:04 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,IP_LINK_PLUS,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW X-Spam-Check-By: apache.org Received-SPF: unknown jmx (athena.apache.org: encountered unrecognized mechanism during SPF processing of domain of adam@adap.tv) Received: from [209.85.216.172] (HELO mail-qy0-f172.google.com) (209.85.216.172) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Mar 2011 20:23:59 +0000 Received: by qyk29 with SMTP id 29so2164120qyk.10 for ; Tue, 29 Mar 2011 13:23:38 -0700 (PDT) Received: by 10.229.40.134 with SMTP id k6mr234254qce.242.1301430218120; Tue, 29 Mar 2011 13:23:38 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.236.194 with HTTP; Tue, 29 Mar 2011 13:23:17 -0700 (PDT) In-Reply-To: <1301423032.5231.3.camel@ubuntu> References: <1301337793.1981.5.camel@ubuntu> <1301423032.5231.3.camel@ubuntu> From: Adam Hahn Date: Tue, 29 Mar 2011 13:23:17 -0700 Message-ID: Subject: Re: ContentEncodingHttpClient throws IOException when reading chunked gzip response To: HttpClient User Discussion Cc: Oleg Kalnichevski Content-Type: multipart/alternative; boundary=001485f894cad9e013049fa4d55f --001485f894cad9e013049fa4d55f Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks, Oleg. Interestingly, when I use the following code snippet, it work= s without throwing an exception: String url =3D " http://173.193.248.156:8080/x/brs1013?aid=3Deedcd7b2-001a-4388-9415-f2cd697= d7608&buid=3D&ip=3D209.117.114.63&ua=3DMozilla/5.0+(Windows;+U;+Windows+NT+= 6.1;+en-US;+rv:1.9.2.15)+Gecko/20110303+Firefox/3.6.15&lang=3Den_US&url=3Dh= ttp://minifb-parking.mindjolt.com/fb/game_iframehtmlad.jsp?gkey=3DFRZ7GJK9O= LYE2VMS&gcat=3Daction>itle=3DParking+Mania&gdesc=3DPark+the+car+without+c= rashing+it.&ts=3D1299189609250&ad_duration=3D30&top=3Dtrue&site=3Dmindjolt.= com&pid=3D9234&frmts=3Dlinear15:300x250,linear15&cat=3Dgames:casual_games&q= ual=3D "; HttpClient httpClient =3D new ContentEncodingHttpClient(); HttpGet get =3D new HttpGet(url); HttpResponse response =3D httpClient.execute(get); HttpEntity entity =3D response.getEntity(); String content =3D EntityUtils.toString(entity); To the best of my knowledge, this should be the equivalent of the prior cod= e snippet (using BasicResponseHandler). I can get by with this workaround, bu= t I would like to know if I'm misusing the library, or if is this unexpected behavior. Thanks, Adam On Tue, Mar 29, 2011 at 11:23 AM, Oleg Kalnichevski wrote= : > ... > > > > DEBUG| Connection can be kept alive indefinitely > > > |DefaultRequestDirector.java:477|org.apache.http.impl.client.ContentEncod= ingHttpClient|main| > > DEBUG| Releasing connection > > org.apache.http.impl.conn.SingleClientConnManager$ConnAdapter@306e7a5b > |SingleClientConnManager.java:267|org.apache.http.impl.conn.SingleClientC= onnManager|main| > > ... > > > It looks very similar to yours. Were you able to consume the response > > without throwing an exception? This run did throw the same exception > noted > > previously. > > > > As you can see the connection was kept alive and released back to the > connection manager. That could not have been done unless the response > content has been fully consumed. > > Oleg > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org > For additional commands, e-mail: httpclient-users-help@hc.apache.org > > --001485f894cad9e013049fa4d55f--