From johnwilliams@example.org Sat Apr 02 11:50:45 2011 Return-Path: <johnwilliams@example.org> Delivered-To: johnwilliams@example.org Received: (qmail 66113 invoked from network); 2 Apr 2011 11:50:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Apr 2011 11:50:45 -0000 Received: (qmail 25734 invoked by uid 500); 2 Apr 2011 11:50:45 -0000 Delivered-To: johnwilliams@example.org Received: (qmail 25683 invoked by uid 500); 2 Apr 2011 11:50:44 -0000 Mailing-List: contact johnwilliams@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:johnwilliams@example.org> List-Unsubscribe: <mailto:johnwilliams@example.org> List-Post: <mailto:johnwilliams@example.org> List-Id: <dev.hc.apache.org> Reply-To: "HttpComponents Project" <johnwilliams@example.org> Delivered-To: mailing list johnwilliams@example.org Received: (qmail 25675 invoked by uid 99); 2 Apr 2011 11:50:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Apr 2011 11:50:43 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO hel.zones.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Apr 2011 11:50:42 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [83.161.120.155]) by hel.zones.apache.org (Postfix) with ESMTP id CB3C78F70A for <johnwilliams@example.org>; Sat, 2 Apr 2011 11:50:05 +0000 (UTC) Date: Sat, 2 Apr 2011 11:50:05 +0000 (UTC) From: "Oleg Kalnichevski (JIRA)" <johnwilliams@example.org> To: johnwilliams@example.org Message-ID: <johnwilliams@example.org> In-Reply-To: <johnwilliams@example.org> Subject: [jira] [Resolved] (HTTPCLIENT-1075) ContentEncodingHttpClient.execute(HttpGet, ResponseHandler<T>) throws IOException when reading chunked gzip response MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HTTPCLIENT-1075?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Oleg Kalnichevski resolved HTTPCLIENT-1075. ------------------------------------------- Resolution: Fixed I improved slightly the way decompressing entities handle content streaming and committed the patch to both SVN trunk and 4.1.x branch. Please review and re-test. Oleg > ContentEncodingHttpClient.execute(HttpGet, ResponseHandler<T>) throws IOException when reading chunked gzip response > -------------------------------------------------------------------------------------------------------------------- > > Key: HTTPCLIENT-1075 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1075 > Project: HttpComponents HttpClient > Issue Type: Bug > Components: HttpClient > Affects Versions: 4.1.1 > Environment: I'm using HttpClient 4.1.1 on Mac OS X 10.6.7. > `java -version` output: > java version "1.6.0_24" > Java(TM) SE Runtime Environment (build 1.6.0_24-b07-334-10M3326) > Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02-334, mixed mode) > Reporter: Adam Hahn > Fix For: 4.1.2 > > Attachments: 0001-HTTPCLIENT-1075-ContentEncodingHttpClient-fails-when.patch > > > The following snippet: > String url = "http://yahoo.com"; > HttpClient httpClient = new ContentEncodingHttpClient(); > HttpGet get = new HttpGet(url); > String content = httpClient.execute(get, new BasicResponseHandler()); > throws: > java.io.IOException: Attempted read from closed stream. > at org.apache.http.impl.io.ChunkedInputStream.read(ChunkedInputStream.java:126) > at java.util.zip.CheckedInputStream.read(CheckedInputStream.java:42) > at java.util.zip.GZIPInputStream.readUByte(GZIPInputStream.java:205) > at java.util.zip.GZIPInputStream.readUShort(GZIPInputStream.java:197) > at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:136) > at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:58) > at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:68) > at org.apache.http.client.entity.GzipDecompressingEntity.getContent(GzipDecompressingEntity.java:63) > at org.apache.http.conn.BasicManagedEntity.getContent(BasicManagedEntity.java:88) > at org.apache.http.util.EntityUtils.consume(EntityUtils.java:65) > at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:974) > at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:919) > at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:910) > at tv.adap.service.HttpPoolTest.testChunkedGzip(HttpPoolTest.java:41) > whereas the following snippet runs fine: > String url = "http://yahoo.com"; > HttpClient httpClient = new ContentEncodingHttpClient(); > HttpGet get = new HttpGet(url); > HttpResponse response = httpClient.execute(get); > HttpEntity entity = response.getEntity(); > String content = EntityUtils.toString(entity); > These two snippets should be functionally the same (putting the entity body into content). Creating a JIRA per the recommendation of Oleg from httpclient-users. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: johnwilliams@example.org For additional commands, e-mail: johnwilliams@example.org From johnwilliams@example.org Wed Apr 06 18:28:54 2011 Return-Path: <johnwilliams@example.org> Delivered-To: johnwilliams@example.org Received: (qmail 86572 invoked from network); 6 Apr 2011 18:28:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 6 Apr 2011 18:28:53 -0000 Received: (qmail 96512 invoked by uid 500); 6 Apr 2011 18:28:53 -0000 Delivered-To: johnwilliams@example.org Received: (qmail 96454 invoked by uid 500); 6 Apr 2011 18:28:52 -0000 Mailing-List: contact johnwilliams@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:johnwilliams@example.org> List-Unsubscribe: <mailto:johnwilliams@example.org> List-Post: <mailto:johnwilliams@example.org> List-Id: <dev.hc.apache.org> Reply-To: "HttpComponents Project" <johnwilliams@example.org> Delivered-To: mailing list johnwilliams@example.org Received: (qmail 96446 invoked by uid 99); 6 Apr 2011 18:28:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Apr 2011 18:28:52 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [83.161.120.155] (HELO ok2cons2.nine.ch) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Apr 2011 18:28:45 +0000 Received: from [83.161.120.155] (250)590-7598.dclient.hispeed.ch [83.161.120.155]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ok2cons2.nine.ch (Postfix) with ESMTPSA id 1619F245E3F6; Wed, 6 Apr 2011 20:28:24 +0200 (CEST) Subject: Re: Fluent interface to httpclient in Stanbol, should that move here? From: Oleg Kalnichevski <johnwilliams@example.org> To: HttpComponents Project <johnwilliams@example.org> Cc: Bertrand Delacretaz <johnwilliams@example.org> In-Reply-To: <johnwilliams@example.org> References: <johnwilliams@example.org> <1298490537.6331.33.camel@ubuntu> <1300970649.1898.104.camel@ubuntu> <johnwilliams@example.org> Content-Type: text/plain; charset="UTF-8" Date: Wed, 06 Apr 2011 20:28:18 +0200 Message-ID: <1302114498.21087.1.camel@ubuntu> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit On Thu, 2011-03-24 at 13:53 +0100, Bertrand Delacretaz wrote: > Hi Oleg, > > On Thu, Mar 24, 2011 at 1:44 PM, Oleg Kalnichevski <johnwilliams@example.org> wrote: > > ...Is this idea still being considered or did you decide against it?... > > Yes, sorry - once again I bite more than I can chew ;-) > > I thought I would have time to make this happen but unexpected work > came up and it looks like I won't have much time for this in the next > few weeks. > > ATM the idea would be to create an API with an independent release > cycle from the rest of httpclient. > > I'll keep this idea on the backburner for now, and come back here once > I have something concrete. Or, if someone wants to work on this I'm > happy to share ideas. > > -Bertrand > > Bertrand and all Actually I just realized this might make a great Google Summer of Code project. Probably we are already too late for this year but I'll raise a JIRA for this idea nonetheless. Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: johnwilliams@example.org For additional commands, e-mail: johnwilliams@example.org From johnwilliams@example.org Wed Apr 06 18:37:46 2011 Return-Path: <johnwilliams@example.org> Delivered-To: johnwilliams@example.org Received: (qmail 41332 invoked from network); 6 Apr 2011 18:37:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 6 Apr 2011 18:37:46 -0000 Received: (qmail 8445 invoked by uid 500); 6 Apr 2011 18:37:45 -0000 Delivered-To: johnwilliams@example.org Received: (qmail 8402 invoked by uid 500); 6 Apr 2011 18:37:45 -0000 Mailing-List: contact johnwilliams@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:johnwilliams@example.org> List-Unsubscribe: <mailto:johnwilliams@example.org> List-Post: <mailto:johnwilliams@example.org> List-Id: <dev.hc.apache.org> Reply-To: "HttpComponents Project" <johnwilliams@example.org> Delivered-To: mailing list johnwilliams@example.org Received: (qmail 8389 invoked by uid 99); 6 Apr 2011 18:37:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Apr 2011 18:37:45 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO hel.zones.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Apr 2011 18:37:43 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [83.161.120.155]) by hel.zones.apache.org (Postfix) with ESMTP id A565D95EC7 for <johnwilliams@example.org>; Wed, 6 Apr 2011 18:37:05 +0000 (UTC) Date: Wed, 6 Apr 2011 18:37:05 +0000 (UTC) From: "Oleg Kalnichevski (JIRA)" <johnwilliams@example.org> To: johnwilliams@example.org Message-ID: <johnwilliams@example.org> Subject: [jira] [Created] (HTTPCLIENT-1076) [GSoC 2011] Fluent API to HttpClient MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [GSoC 2011] Fluent API to HttpClient ------------------------------------ Key: HTTPCLIENT-1076 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1076 Project: HttpComponents HttpClient Issue Type: New Feature Reporter: Oleg Kalnichevski Fix For: Future Develop fluent API / facade to HttpClient based on code currently maintained by Apache Stanbol and Apache Sling projects. For details see http://markmail.org/message/mmyljtgjp3za6kyz or contact Apache HttpComponents committers at johnwilliams@example.org -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: johnwilliams@example.org For additional commands, e-mail: johnwilliams@example.org From johnwilliams@example.org Thu Apr 07 00:18:40 2011 Return-Path: <johnwilliams@example.org> Delivered-To: johnwilliams@example.org Received: (qmail 41896 invoked from network); 7 Apr 2011 00:18:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 7 Apr 2011 00:18:40 -0000 Received: (qmail 68466 invoked by uid 500); 7 Apr 2011 00:18:40 -0000 Delivered-To: johnwilliams@example.org Received: (qmail 68429 invoked by uid 500); 7 Apr 2011 00:18:40 -0000 Mailing-List: contact johnwilliams@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:johnwilliams@example.org> List-Unsubscribe: <mailto:johnwilliams@example.org> List-Post: <mailto:johnwilliams@example.org> List-Id: <dev.hc.apache.org> Reply-To: "HttpComponents Project" <johnwilliams@example.org> Delivered-To: mailing list johnwilliams@example.org Received: (qmail 68421 invoked by uid 99); 7 Apr 2011 00:18:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Apr 2011 00:18:40 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of johnwilliams@example.org designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO mail-vx0-f179.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Apr 2011 00:18:32 +0000 Received: by vxi40 with SMTP id 40so1520210vxi.10 for <johnwilliams@example.org>; Wed, 06 Apr 2011 17:18:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=sqihykUOThlf+21jt3p5rAkPjgT95A3Oz1CZvnNoNX0=; b=peBa6FoTXf958TS8ZF/9cxT1PUoifnS+AQ+v5cycTFHukFbjqP3UtvYLPML4MEngfc JKNh1MTlEmeqeW67jQr3OUNXunjhMOU0VX2wjDGGZYUI7ChNb0pk7lB85gHHenBQQKfO rFIluUQHkD7aOFWdK+OzMJPNkBdv1wCtb9Ulw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=PBzdDP8jzDL7KJyzUb2ll5KM4uCvad2PQ4lDx2g2j9OZKO/iMTdwR2oLFLHnbk2cKI jokpacGS3ghq/m/bDxgswsnl5tHMmsoA1HcHDOCwBeO/jeEv8Ze3i2FnDEkWaB48yylV fBP0EPjZu2oJZTj8W9crWeq3Y2ot2NZBnYKEY= MIME-Version: 1.0 Received: by 83.161.120.155 with SMTP id o8mr80676vch.36.1302135491545; Wed, 06 Apr 2011 17:18:11 -0700 (PDT) Received: by 83.161.120.155 with HTTP; Wed, 6 Apr 2011 17:18:11 -0700 (PDT) Date: Thu, 7 Apr 2011 01:18:11 +0100 Message-ID: <johnwilliams@example.org> Subject: Should DefaultHttpClient add ResponseContentEncoding response handler as default? From: sebb <johnwilliams@example.org> To: HttpComponents Project <johnwilliams@example.org> Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org The DefaultHttpClient class sets up a lot of HttpResponseInterceptors, but does not currently include ResponseContentEncoding which handles Content-Encoding (e.g. gzip) Seems like a strange omission. Its subclass ContentEncodingHttpClient adds ResponseContentEncoding, but also adds RequestAcceptEncoding which might not be wanted for all requests. For example, JMeter creates an HttpClient instance, and may or may not add the Accept-Encoding header later. So it has to sub-class DefaultHttpClient to add the handler. Would there be any drawback to including ResponseContentEncoding in DefaultHttpClient by default? --------------------------------------------------------------------- To unsubscribe, e-mail: johnwilliams@example.org For additional commands, e-mail: johnwilliams@example.org From johnwilliams@example.org Thu Apr 07 08:23:22 2011 Return-Path: <johnwilliams@example.org> Delivered-To: johnwilliams@example.org Received: (qmail 13884 invoked from network); 7 Apr 2011 08:23:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 7 Apr 2011 08:23:22 -0000 Received: (qmail 6117 invoked by uid 500); 7 Apr 2011 08:23:22 -0000 Delivered-To: johnwilliams@example.org Received: (qmail 6091 invoked by uid 500); 7 Apr 2011 08:23:22 -0000 Mailing-List: contact johnwilliams@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:johnwilliams@example.org> List-Unsubscribe: <mailto:johnwilliams@example.org> List-Post: <mailto:johnwilliams@example.org> List-Id: <dev.hc.apache.org> Reply-To: "HttpComponents Project" <johnwilliams@example.org> Delivered-To: mailing list johnwilliams@example.org Received: (qmail 6082 invoked by uid 99); 7 Apr 2011 08:23:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Apr 2011 08:23:19 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [83.161.120.155] (HELO ok2cons2.nine.ch) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Apr 2011 08:23:12 +0000 Received: from [83.161.120.155] (250)590-7598.dclient.hispeed.ch [83.161.120.155]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ok2cons2.nine.ch (Postfix) with ESMTPSA id 4679D245E3F7 for <johnwilliams@example.org>; Thu, 7 Apr 2011 10:22:51 +0200 (CEST) Subject: Re: Should DefaultHttpClient add ResponseContentEncoding response handler as default? From: Oleg Kalnichevski <johnwilliams@example.org> To: HttpComponents Project <johnwilliams@example.org> In-Reply-To: <johnwilliams@example.org> References: <johnwilliams@example.org> Content-Type: text/plain; charset="UTF-8" Date: Thu, 07 Apr 2011 10:22:53 +0200 Message-ID: <1302164573.21087.20.camel@ubuntu> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit On Thu, 2011-04-07 at 01:18 +0100, sebb wrote: > The DefaultHttpClient class sets up a lot of HttpResponseInterceptors, > but does not currently include ResponseContentEncoding which handles > Content-Encoding (e.g. gzip) > > Seems like a strange omission. > > > Its subclass ContentEncodingHttpClient adds ResponseContentEncoding, > but also adds RequestAcceptEncoding which might not be wanted for all > requests. > > For example, JMeter creates an HttpClient instance, and may or may not > add the Accept-Encoding header later. So it has to sub-class > DefaultHttpClient to add the handler. > > Would there be any drawback to including ResponseContentEncoding in > DefaultHttpClient by default? > Hi Sebastian This was a conscious decision to avoid conflicts with custom content coding solutions that may have been developed for HttpClient 4.0. We can certainly revisit that decision for 4.2 Please note, though, one can dynamically enable content coding support by adding two protocol interceptors at run time --- DefaultHttpClient httpclient = new DefaultHttpClient(); httpclient.addRequestInterceptor(new RequestAcceptEncoding()); httpclient.addResponseInterceptor(new ResponseContentEncoding()); --- The critical bit is to make sure to not add them more than once Cheers Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: johnwilliams@example.org For additional commands, e-mail: johnwilliams@example.org From johnwilliams@example.org Thu Apr 07 11:50:51 2011 Return-Path: <johnwilliams@example.org> Delivered-To: johnwilliams@example.org Received: (qmail 7735 invoked from network); 7 Apr 2011 11:50:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 7 Apr 2011 11:50:50 -0000 Received: (qmail 53950 invoked by uid 500); 7 Apr 2011 11:50:50 -0000 Delivered-To: johnwilliams@example.org Received: (qmail 53900 invoked by uid 500); 7 Apr 2011 11:50:49 -0000 Mailing-List: contact johnwilliams@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:johnwilliams@example.org> List-Unsubscribe: <mailto:johnwilliams@example.org> List-Post: <mailto:johnwilliams@example.org> List-Id: <dev.hc.apache.org> Reply-To: "HttpComponents Project" <johnwilliams@example.org> Delivered-To: mailing list johnwilliams@example.org Received: (qmail 53892 invoked by uid 99); 7 Apr 2011 11:50:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Apr 2011 11:50:49 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of johnwilliams@example.org designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO mail-vx0-f179.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Apr 2011 11:50:41 +0000 Received: by vxi40 with SMTP id 40so1788337vxi.10 for <johnwilliams@example.org>; Thu, 07 Apr 2011 04:50:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=SA9jDnKRfhNsv5uqXppDoR48nH/CBu+8umxLI2cDV4o=; b=Lzlwm28WP/gi3GFf+/NzBzByUk5PGKHMjeWqT5cC4zzUfyJ1aAiX5YPioNhUqaT9bn 3D2Ig5uWDpuRH9yXVfejV7B+j85IxvZJI/zIWopCLRiG0bH5TEYJmA69WzVi7vu71R34 ewKtlxjRskUaOSJnmk4VPJyBV/77bBMHCVzBA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=NjU6H0t8L5b0Dlku3npN+AiP+fcVSu+fuWuiS1+7elb//YsnVYDA+KAzjPVZdUJmmX 3KEqYq+v/iiuv3az7kiAW9/W4jX+8GSLlwD09/2dXZDUOXCHPj12jKKi088B6CMtR+9I Ic+bl6UXjQuT42rTyl1glkq/aXXoMmOQWiCjU= MIME-Version: 1.0 Received: by 83.161.120.155 with SMTP id el6mr1074912vdc.46.1302177021001; Thu, 07 Apr 2011 04:50:21 -0700 (PDT) Received: by 83.161.120.155 with HTTP; Thu, 7 Apr 2011 04:50:20 -0700 (PDT) In-Reply-To: <1302164573.21087.20.camel@ubuntu> References: <johnwilliams@example.org> <1302164573.21087.20.camel@ubuntu> Date: Thu, 7 Apr 2011 12:50:20 +0100 Message-ID: <johnwilliams@example.org> Subject: Re: Should DefaultHttpClient add ResponseContentEncoding response handler as default? From: sebb <johnwilliams@example.org> To: HttpComponents Project <johnwilliams@example.org> Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On 7 April 2011 09:22, Oleg Kalnichevski <johnwilliams@example.org> wrote: > On Thu, 2011-04-07 at 01:18 +0100, sebb wrote: >> The DefaultHttpClient class sets up a lot of HttpResponseInterceptors, >> but does not currently include ResponseContentEncoding which handles >> Content-Encoding (e.g. gzip) >> >> Seems like a strange omission. >> >> >> Its subclass ContentEncodingHttpClient adds ResponseContentEncoding, >> but also adds RequestAcceptEncoding which might not be wanted for all >> requests. >> >> For example, JMeter creates an HttpClient instance, and may or may not >> add the Accept-Encoding header later. So it has to sub-class >> DefaultHttpClient to add the handler. >> >> Would there be any drawback to including ResponseContentEncoding in >> DefaultHttpClient by default? >> > > Hi Sebastian > > This was a conscious decision to avoid conflicts with custom content > coding solutions that may have been developed for HttpClient 4.0. I see. > We can certainly revisit that decision for 4.2 Probably should be optional to avoid unnecessary code changes. > Please note, though, one can dynamically enable content coding support > by adding two protocol interceptors at run time > > --- > DefaultHttpClient httpclient = new DefaultHttpClient(); > httpclient.addRequestInterceptor(new RequestAcceptEncoding()); > httpclient.addResponseInterceptor(new ResponseContentEncoding()); Yes, I discovered that later; it would be useful to add it to the Javadoc (I'll take care of that). > --- > > The critical bit is to make sure to not add them more than once Which means we should be careful to document the interceptors that are being added ;-) The class Javadoc mentions only 10 interceptors but createHttpProcessor() adds 12. I propose to take care of that by adding the Javadoc to the method, and referencing that from the class Javadoc. > > Cheers > > Oleg > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: johnwilliams@example.org > For additional commands, e-mail: johnwilliams@example.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: johnwilliams@example.org For additional commands, e-mail: johnwilliams@example.org From johnwilliams@example.org Fri Apr 08 03:33:01 2011 Return-Path: <johnwilliams@example.org> Delivered-To: johnwilliams@example.org Received: (qmail 96736 invoked from network); 8 Apr 2011 03:33:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 8 Apr 2011 03:33:00 -0000 Received: (qmail 95894 invoked by uid 500); 8 Apr 2011 03:33:00 -0000 Delivered-To: johnwilliams@example.org Received: (qmail 95851 invoked by uid 500); 8 Apr 2011 03:32:52 -0000 Mailing-List: contact johnwilliams@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:johnwilliams@example.org> List-Unsubscribe: <mailto:johnwilliams@example.org> List-Post: <mailto:johnwilliams@example.org> List-Id: <dev.hc.apache.org> Reply-To: "HttpComponents Project" <johnwilliams@example.org> Delivered-To: mailing list johnwilliams@example.org Received: (qmail 95688 invoked by uid 99); 8 Apr 2011 03:32:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Apr 2011 03:32:46 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO hel.zones.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Apr 2011 03:32:43 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [83.161.120.155]) by hel.zones.apache.org (Postfix) with ESMTP id B097A97EE7 for <johnwilliams@example.org>; Fri, 8 Apr 2011 03:32:05 +0000 (UTC) Date: Fri, 8 Apr 2011 03:32:05 +0000 (UTC) From: "imalka hemachandra (JIRA)" <johnwilliams@example.org> To: johnwilliams@example.org Message-ID: <johnwilliams@example.org> In-Reply-To: <johnwilliams@example.org> Subject: [jira] [Commented] (HTTPCLIENT-1076) [GSoC 2011] Fluent API to HttpClient MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HTTPCLIENT-1076?page=3Dcom.atla= ssian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId= =3D13017256#comment-13017256 ]=20 imalka hemachandra commented on HTTPCLIENT-1076: ------------------------------------------------ I=E2=80=99m a computer science third year student who willing to participat= e for GSOC 2011 and i am interested in this project idea. I would like to k= now further details on this topic. Looking forward to hear from you. Thanks= in advance. =20 > [GSoC 2011] Fluent API to HttpClient > ------------------------------------ > > Key: HTTPCLIENT-1076 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-107= 6 > Project: HttpComponents HttpClient > Issue Type: New Feature > Reporter: Oleg Kalnichevski > Labels: gsoc2011 > Fix For: Future > > > Develop fluent API / facade to HttpClient based on code currently maintai= ned by Apache Stanbol and Apache Sling projects.=20 > For details see=20 > http://markmail.org/message/mmyljtgjp3za6kyz > or contact Apache HttpComponents committers at johnwilliams@example.org -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: johnwilliams@example.org For additional commands, e-mail: johnwilliams@example.org From johnwilliams@example.org Fri Apr 08 09:31:50 2011 Return-Path: <johnwilliams@example.org> Delivered-To: johnwilliams@example.org Received: (qmail 62249 invoked from network); 8 Apr 2011 09:31:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 8 Apr 2011 09:31:50 -0000 Received: (qmail 93337 invoked by uid 500); 8 Apr 2011 09:31:49 -0000 Delivered-To: johnwilliams@example.org Received: (qmail 93233 invoked by uid 500); 8 Apr 2011 09:31:45 -0000 Mailing-List: contact johnwilliams@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:johnwilliams@example.org> List-Unsubscribe: <mailto:johnwilliams@example.org> List-Post: <mailto:johnwilliams@example.org> List-Id: <dev.hc.apache.org> Reply-To: "HttpComponents Project" <johnwilliams@example.org> Delivered-To: mailing list johnwilliams@example.org Received: (qmail 93217 invoked by uid 99); 8 Apr 2011 09:31:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Apr 2011 09:31:44 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO hel.zones.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Apr 2011 09:31:42 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [83.161.120.155]) by hel.zones.apache.org (Postfix) with ESMTP id BAFEE9861C for <johnwilliams@example.org>; Fri, 8 Apr 2011 09:31:05 +0000 (UTC) Date: Fri, 8 Apr 2011 09:31:05 +0000 (UTC) From: "Andreas Fagschlunger (JIRA)" <johnwilliams@example.org> To: johnwilliams@example.org Message-ID: <{{EMAIL+PHONE}}> Subject: [jira] [Created] (HTTPCLIENT-1077) CookiePolicy.RFC_2109: Unable to parse expires attribute (Thu, 01-Dec-94 16:00:00 GMT) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 CookiePolicy.RFC_2109: Unable to parse expires attribute (Thu, 01-Dec-94 16:00:00 GMT) -------------------------------------------------------------------------------------- Key: HTTPCLIENT-1077 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1077 Project: HttpComponents HttpClient Issue Type: Bug Components: HttpCookie Affects Versions: 4.1.1 Environment: JVM where de default Locale ist not Locale.US. Reporter: Andreas Fagschlunger Priority: Minor In our Application we're facing problems using HttpClient 4.x (didn't have that problem with HttpClient 3.1). The HttpClient has problems parsing the Cookie's Expires-Attribute: 2011-04-08 10:14:21,647 [btpool0-0] WARN org.apache.http.client.protocol.ResponseProcessCookies - Invalid cookie header: "Set-Cookie: dfName=""; Expires=Thu, 01-Dec-94 16:00:00 GMT; Path=/appl/ebp". Unable to parse expires attribute: Thu We are using Cookie-Policy RFC2109: httpClient = new DefaultHttpClient(connectionManager); httpClient.getParams().setParameter(ClientPNames.COOKIE_POLICY, CookiePolicy.RFC_2109); The problems seems to be the JVM's default Locale, which is in our case de_AT and not en_US. See following Example: [Java] System.out.println("Locale=" + Locale.getDefault()); String[] datePatterns = new String[] { DateUtils.PATTERN_ASCTIME, DateUtils.PATTERN_RFC1036, DateUtils.PATTERN_RFC1123 }; for (String pattern : datePatterns) { try { SimpleDateFormat dateFormat = new SimpleDateFormat(pattern); dateFormat.parse("Thu, 01-Dec-94 16:00:00 GMT"); } catch (ParseException e) { System.out.println("Pattern '" + pattern + "' failed."); } } [/Java] The output for me is following: Locale=de_AT Pattern 'EEE MMM d HH:mm:ss yyyy' failed. Pattern 'EEEE, dd-MMM-yy HH:mm:ss zzz' failed. Pattern 'EEE, dd MMM yyyy HH:mm:ss zzz' failed. Setting the default Locale to US (Locale.setDefault(Locale.US)), the output changes: Locale=en_US Pattern 'EEE MMM d HH:mm:ss yyyy' failed. Pattern 'EEE, dd MMM yyyy HH:mm:ss zzz' failed. So the Date (Thu, 01-Dec-94 16:00:00 GMT) and the pattern (DateUtils.PATTERN_RFC1036: EEEE, dd-MMM-yy HH:mm:ss zzz) seem to be valid, just the Locale is not explicitly set for the SimpleDateFormat: http://download.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html#SimpleDateFormat%28java.lang.String,%20java.util.Locale%29 I hope I didn't waste your time and this is realy a bug. Best regards, Billie -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: johnwilliams@example.org For additional commands, e-mail: johnwilliams@example.org From johnwilliams@example.org Fri Apr 08 11:07:46 2011 Return-Path: <johnwilliams@example.org> Delivered-To: johnwilliams@example.org Received: (qmail 96555 invoked from network); 8 Apr 2011 11:07:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 8 Apr 2011 11:07:46 -0000 Received: (qmail 4201 invoked by uid 500); 8 Apr 2011 11:07:46 -0000 Delivered-To: johnwilliams@example.org Received: (qmail 4165 invoked by uid 500); 8 Apr 2011 11:07:46 -0000 Mailing-List: contact johnwilliams@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:johnwilliams@example.org> List-Unsubscribe: <mailto:johnwilliams@example.org> List-Post: <mailto:johnwilliams@example.org> List-Id: <dev.hc.apache.org> Reply-To: "HttpComponents Project" <johnwilliams@example.org> Delivered-To: mailing list johnwilliams@example.org Received: (qmail 4157 invoked by uid 99); 8 Apr 2011 11:07:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Apr 2011 11:07:45 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO hel.zones.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Apr 2011 11:07:43 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [83.161.120.155]) by hel.zones.apache.org (Postfix) with ESMTP id C2C0B98375 for <johnwilliams@example.org>; Fri, 8 Apr 2011 11:07:05 +0000 (UTC) Date: Fri, 8 Apr 2011 11:07:05 +0000 (UTC) From: "Oleg Kalnichevski (JIRA)" <johnwilliams@example.org> To: johnwilliams@example.org Message-ID: <johnwilliams@example.org> In-Reply-To: <johnwilliams@example.org> Subject: [jira] [Commented] (HTTPCLIENT-1076) [GSoC 2011] Fluent API to HttpClient MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HTTPCLIENT-1076?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13017395#comment-13017395 ] Oleg Kalnichevski commented on HTTPCLIENT-1076: ----------------------------------------------- Imalka A successful completion of this project would require the following (1) Good understanding of the HttpClient 4.x API (2) Certain familiarity with the HTTP protocol in general (3) Familiarity with the concept of fluent interface [1] (4) Interest and ideally experience in designing APIs (5) Liaising with several Apache projects, primarily HttpComponents and Apache Stanbol (in incubation), and ability to reconcile different (often conflicting) ideas about interface / API design In sort, key requisites are HttpClient knowledge, understanding of fluent interface / API design and good communication. Hope this gives you enough details / pointers for a GSoC proposal. Oleg [1] http://en.wikipedia.org/wiki/Fluent_interface > [GSoC 2011] Fluent API to HttpClient > ------------------------------------ > > Key: HTTPCLIENT-1076 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1076 > Project: HttpComponents HttpClient > Issue Type: New Feature > Reporter: Oleg Kalnichevski > Labels: gsoc2011 > Fix For: Future > > > Develop fluent API / facade to HttpClient based on code currently maintained by Apache Stanbol and Apache Sling projects. > For details see > http://markmail.org/message/mmyljtgjp3za6kyz > or contact Apache HttpComponents committers at johnwilliams@example.org -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: johnwilliams@example.org For additional commands, e-mail: johnwilliams@example.org From johnwilliams@example.org Fri Apr 08 11:21:47 2011 Return-Path: <johnwilliams@example.org> Delivered-To: johnwilliams@example.org Received: (qmail 17922 invoked from network); 8 Apr 2011 11:21:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 8 Apr 2011 11:21:47 -0000 Received: (qmail 17752 invoked by uid 500); 8 Apr 2011 11:21:47 -0000 Delivered-To: johnwilliams@example.org Received: (qmail 17722 invoked by uid 500); 8 Apr 2011 11:21:47 -0000 Mailing-List: contact johnwilliams@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:johnwilliams@example.org> List-Unsubscribe: <mailto:johnwilliams@example.org> List-Post: <mailto:johnwilliams@example.org> List-Id: <dev.hc.apache.org> Reply-To: "HttpComponents Project" <johnwilliams@example.org> Delivered-To: mailing list johnwilliams@example.org Received: (qmail 17713 invoked by uid 99); 8 Apr 2011 11:21:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Apr 2011 11:21:47 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_FRT_COCK,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO hel.zones.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Apr 2011 11:21:43 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [83.161.120.155]) by hel.zones.apache.org (Postfix) with ESMTP id BA3E89885D for <johnwilliams@example.org>; Fri, 8 Apr 2011 11:21:05 +0000 (UTC) Date: Fri, 8 Apr 2011 11:21:05 +0000 (UTC) From: "Oleg Kalnichevski (JIRA)" <johnwilliams@example.org> To: johnwilliams@example.org Message-ID: <johnwilliams@example.org> In-Reply-To: <{{EMAIL+PHONE}}> Subject: [jira] [Commented] (HTTPCLIENT-1077) CookiePolicy.RFC_2109: Unable to parse expires attribute (Thu, 01-Dec-94 16:00:00 GMT) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HTTPCLIENT-1077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13017402#comment-13017402 ] Oleg Kalnichevski commented on HTTPCLIENT-1077: ----------------------------------------------- That's bizarre. As far as I can tell US locale is explicitly set when creating instances of SimpleDateFormat [1]. Am I still missing something? Oleg [1] http://hc.apache.org/httpcomponents-client-ga/httpclient/xref/org/apache/http/impl/cookie/DateUtils.html#249 > CookiePolicy.RFC_2109: Unable to parse expires attribute (Thu, 01-Dec-94 16:00:00 GMT) > -------------------------------------------------------------------------------------- > > Key: HTTPCLIENT-1077 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1077 > Project: HttpComponents HttpClient > Issue Type: Bug > Components: HttpCookie > Affects Versions: 4.1.1 > Environment: JVM where de default Locale ist not Locale.US. > Reporter: Andreas Fagschlunger > Priority: Minor > Labels: coocki > > In our Application we're facing problems using HttpClient 4.x (didn't have that problem with HttpClient 3.1). The HttpClient has problems parsing the Cookie's Expires-Attribute: > 2011-04-08 10:14:21,647 [btpool0-0] WARN org.apache.http.client.protocol.ResponseProcessCookies - Invalid cookie header: "Set-Cookie: dfName=""; Expires=Thu, 01-Dec-94 16:00:00 GMT; Path=/appl/ebp". Unable to parse expires attribute: Thu > We are using Cookie-Policy RFC2109: > httpClient = new DefaultHttpClient(connectionManager); > httpClient.getParams().setParameter(ClientPNames.COOKIE_POLICY, CookiePolicy.RFC_2109); > The problems seems to be the JVM's default Locale, which is in our case de_AT and not en_US. See following Example: > [Java] > System.out.println("Locale=" + Locale.getDefault()); > String[] datePatterns = new String[] { > DateUtils.PATTERN_ASCTIME, > DateUtils.PATTERN_RFC1036, > DateUtils.PATTERN_RFC1123 }; > for (String pattern : datePatterns) { > try { > SimpleDateFormat dateFormat = new SimpleDateFormat(pattern); > dateFormat.parse("Thu, 01-Dec-94 16:00:00 GMT"); > } catch (ParseException e) { > System.out.println("Pattern '" + pattern + "' failed."); > } > } > [/Java] > The output for me is following: > Locale=de_AT > Pattern 'EEE MMM d HH:mm:ss yyyy' failed. > Pattern 'EEEE, dd-MMM-yy HH:mm:ss zzz' failed. > Pattern 'EEE, dd MMM yyyy HH:mm:ss zzz' failed. > Setting the default Locale to US (Locale.setDefault(Locale.US)), the output changes: > Locale=en_US > Pattern 'EEE MMM d HH:mm:ss yyyy' failed. > Pattern 'EEE, dd MMM yyyy HH:mm:ss zzz' failed. > So the Date (Thu, 01-Dec-94 16:00:00 GMT) and the pattern (DateUtils.PATTERN_RFC1036: EEEE, dd-MMM-yy HH:mm:ss zzz) seem to be valid, just the Locale is not explicitly set for the SimpleDateFormat: > http://download.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html#SimpleDateFormat%28java.lang.String,%20java.util.Locale%29 > I hope I didn't waste your time and this is realy a bug. > Best regards, > Billie -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: johnwilliams@example.org For additional commands, e-mail: johnwilliams@example.org From johnwilliams@example.org Fri Apr 08 12:02:47 2011 Return-Path: <johnwilliams@example.org> Delivered-To: johnwilliams@example.org Received: (qmail 58922 invoked from network); 8 Apr 2011 12:02:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 8 Apr 2011 12:02:46 -0000 Received: (qmail 68207 invoked by uid 500); 8 Apr 2011 12:02:46 -0000 Delivered-To: johnwilliams@example.org Received: (qmail 68170 invoked by uid 500); 8 Apr 2011 12:02:46 -0000 Mailing-List: contact johnwilliams@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:johnwilliams@example.org> List-Unsubscribe: <mailto:johnwilliams@example.org> List-Post: <mailto:johnwilliams@example.org> List-Id: <dev.hc.apache.org> Reply-To: "HttpComponents Project" <johnwilliams@example.org> Delivered-To: mailing list johnwilliams@example.org Received: (qmail 68159 invoked by uid 99); 8 Apr 2011 12:02:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Apr 2011 12:02:46 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_FRT_COCK,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO hel.zones.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Apr 2011 12:02:43 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [83.161.120.155]) by hel.zones.apache.org (Postfix) with ESMTP id C451D98628 for <johnwilliams@example.org>; Fri, 8 Apr 2011 12:02:05 +0000 (UTC) Date: Fri, 8 Apr 2011 12:02:05 +0000 (UTC) From: "Andreas Fagschlunger (JIRA)" <johnwilliams@example.org> To: johnwilliams@example.org Message-ID: <johnwilliams@example.org> In-Reply-To: <{{EMAIL+PHONE}}> Subject: [jira] [Updated] (HTTPCLIENT-1077) CookiePolicy.RFC_2109: Unable to parse expires attribute (Thu, 01-Dec-94 16:00:00 GMT) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HTTPCLIENT-1077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andreas Fagschlunger updated HTTPCLIENT-1077: --------------------------------------------- Attachment: HTTPCLIENT-1077.zip Full Log-File including start up.The Cookie ist always set in Response to the /appl/ebp/sbp/startCardSession.html-Request (2011-04-08 13:52:01,943). > CookiePolicy.RFC_2109: Unable to parse expires attribute (Thu, 01-Dec-94 16:00:00 GMT) > -------------------------------------------------------------------------------------- > > Key: HTTPCLIENT-1077 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1077 > Project: HttpComponents HttpClient > Issue Type: Bug > Components: HttpCookie > Affects Versions: 4.1.1 > Environment: JVM where de default Locale ist not Locale.US. > Reporter: Andreas Fagschlunger > Priority: Minor > Labels: coocki > Attachments: HTTPCLIENT-1077.zip > > > In our Application we're facing problems using HttpClient 4.x (didn't have that problem with HttpClient 3.1). The HttpClient has problems parsing the Cookie's Expires-Attribute: > 2011-04-08 10:14:21,647 [btpool0-0] WARN org.apache.http.client.protocol.ResponseProcessCookies - Invalid cookie header: "Set-Cookie: dfName=""; Expires=Thu, 01-Dec-94 16:00:00 GMT; Path=/appl/ebp". Unable to parse expires attribute: Thu > We are using Cookie-Policy RFC2109: > httpClient = new DefaultHttpClient(connectionManager); > httpClient.getParams().setParameter(ClientPNames.COOKIE_POLICY, CookiePolicy.RFC_2109); > The problems seems to be the JVM's default Locale, which is in our case de_AT and not en_US. See following Example: > [Java] > System.out.println("Locale=" + Locale.getDefault()); > String[] datePatterns = new String[] { > DateUtils.PATTERN_ASCTIME, > DateUtils.PATTERN_RFC1036, > DateUtils.PATTERN_RFC1123 }; > for (String pattern : datePatterns) { > try { > SimpleDateFormat dateFormat = new SimpleDateFormat(pattern); > dateFormat.parse("Thu, 01-Dec-94 16:00:00 GMT"); > } catch (ParseException e) { > System.out.println("Pattern '" + pattern + "' failed."); > } > } > [/Java] > The output for me is following: > Locale=de_AT > Pattern 'EEE MMM d HH:mm:ss yyyy' failed. > Pattern 'EEEE, dd-MMM-yy HH:mm:ss zzz' failed. > Pattern 'EEE, dd MMM yyyy HH:mm:ss zzz' failed. > Setting the default Locale to US (Locale.setDefault(Locale.US)), the output changes: > Locale=en_US > Pattern 'EEE MMM d HH:mm:ss yyyy' failed. > Pattern 'EEE, dd MMM yyyy HH:mm:ss zzz' failed. > So the Date (Thu, 01-Dec-94 16:00:00 GMT) and the pattern (DateUtils.PATTERN_RFC1036: EEEE, dd-MMM-yy HH:mm:ss zzz) seem to be valid, just the Locale is not explicitly set for the SimpleDateFormat: > http://download.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html#SimpleDateFormat%28java.lang.String,%20java.util.Locale%29 > I hope I didn't waste your time and this is realy a bug. > Best regards, > Billie -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: johnwilliams@example.org For additional commands, e-mail: johnwilliams@example.org From johnwilliams@example.org Fri Apr 08 12:36:47 2011 Return-Path: <johnwilliams@example.org> Delivered-To: johnwilliams@example.org Received: (qmail 73861 invoked from network); 8 Apr 2011 12:36:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 8 Apr 2011 12:36:47 -0000 Received: (qmail 8022 invoked by uid 500); 8 Apr 2011 12:36:47 -0000 Delivered-To: johnwilliams@example.org Received: (qmail 7991 invoked by uid 500); 8 Apr 2011 12:36:47 -0000 Mailing-List: contact johnwilliams@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:johnwilliams@example.org> List-Unsubscribe: <mailto:johnwilliams@example.org> List-Post: <mailto:johnwilliams@example.org> List-Id: <dev.hc.apache.org> Reply-To: "HttpComponents Project" <johnwilliams@example.org> Delivered-To: mailing list johnwilliams@example.org Received: (qmail 7981 invoked by uid 99); 8 Apr 2011 12:36:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Apr 2011 12:36:47 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_FRT_COCK,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO hel.zones.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Apr 2011 12:36:44 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [83.161.120.155]) by hel.zones.apache.org (Postfix) with ESMTP id 16A6698171 for <johnwilliams@example.org>; Fri, 8 Apr 2011 12:36:06 +0000 (UTC) Date: Fri, 8 Apr 2011 12:36:06 +0000 (UTC) From: "Andreas Fagschlunger (JIRA)" <johnwilliams@example.org> To: johnwilliams@example.org Message-ID: <johnwilliams@example.org> In-Reply-To: <{{EMAIL+PHONE}}> Subject: [jira] [Commented] (HTTPCLIENT-1077) CookiePolicy.RFC_2109: Unable to parse expires attribute (Thu, 01-Dec-94 16:00:00 GMT) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HTTPCLIENT-1077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13017429#comment-13017429 ] Andreas Fagschlunger commented on HTTPCLIENT-1077: -------------------------------------------------- Hm, the error message is "Unable to parse expires attribute: Thu ", the Expires-String is "Thu, 01-Dec-94 16:00:00 GMT". According to the BasicExpiresHandler the whole Expires-String should be displayed in the log message: http://hc.apache.org/httpcomponents-client-ga/httpclient/xref/org/apache/http/impl/cookie/BasicExpiresHandler.html Maybe there is something wrong with the whole cookie format? Is it possible that the Cookie-Spec RFC 2109 don't likes the comma (,) in the Expires-Date-String? > CookiePolicy.RFC_2109: Unable to parse expires attribute (Thu, 01-Dec-94 16:00:00 GMT) > -------------------------------------------------------------------------------------- > > Key: HTTPCLIENT-1077 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1077 > Project: HttpComponents HttpClient > Issue Type: Bug > Components: HttpCookie > Affects Versions: 4.1.1 > Environment: JVM where de default Locale ist not Locale.US. > Reporter: Andreas Fagschlunger > Priority: Minor > Labels: coocki > Attachments: HTTPCLIENT-1077.zip > > > In our Application we're facing problems using HttpClient 4.x (didn't have that problem with HttpClient 3.1). The HttpClient has problems parsing the Cookie's Expires-Attribute: > 2011-04-08 10:14:21,647 [btpool0-0] WARN org.apache.http.client.protocol.ResponseProcessCookies - Invalid cookie header: "Set-Cookie: dfName=""; Expires=Thu, 01-Dec-94 16:00:00 GMT; Path=/appl/ebp". Unable to parse expires attribute: Thu > We are using Cookie-Policy RFC2109: > httpClient = new DefaultHttpClient(connectionManager); > httpClient.getParams().setParameter(ClientPNames.COOKIE_POLICY, CookiePolicy.RFC_2109); > The problems seems to be the JVM's default Locale, which is in our case de_AT and not en_US. See following Example: > [Java] > System.out.println("Locale=" + Locale.getDefault()); > String[] datePatterns = new String[] { > DateUtils.PATTERN_ASCTIME, > DateUtils.PATTERN_RFC1036, > DateUtils.PATTERN_RFC1123 }; > for (String pattern : datePatterns) { > try { > SimpleDateFormat dateFormat = new SimpleDateFormat(pattern); > dateFormat.parse("Thu, 01-Dec-94 16:00:00 GMT"); > } catch (ParseException e) { > System.out.println("Pattern '" + pattern + "' failed."); > } > } > [/Java] > The output for me is following: > Locale=de_AT > Pattern 'EEE MMM d HH:mm:ss yyyy' failed. > Pattern 'EEEE, dd-MMM-yy HH:mm:ss zzz' failed. > Pattern 'EEE, dd MMM yyyy HH:mm:ss zzz' failed. > Setting the default Locale to US (Locale.setDefault(Locale.US)), the output changes: > Locale=en_US > Pattern 'EEE MMM d HH:mm:ss yyyy' failed. > Pattern 'EEE, dd MMM yyyy HH:mm:ss zzz' failed. > So the Date (Thu, 01-Dec-94 16:00:00 GMT) and the pattern (DateUtils.PATTERN_RFC1036: EEEE, dd-MMM-yy HH:mm:ss zzz) seem to be valid, just the Locale is not explicitly set for the SimpleDateFormat: > http://download.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html#SimpleDateFormat%28java.lang.String,%20java.util.Locale%29 > I hope I didn't waste your time and this is realy a bug. > Best regards, > Billie -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: johnwilliams@example.org For additional commands, e-mail: johnwilliams@example.org From johnwilliams@example.org Fri Apr 08 17:36:53 2011 Return-Path: <johnwilliams@example.org> Delivered-To: johnwilliams@example.org Received: (qmail 83134 invoked from network); 8 Apr 2011 17:36:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 8 Apr 2011 17:36:53 -0000 Received: (qmail 71510 invoked by uid 500); 8 Apr 2011 17:36:53 -0000 Delivered-To: johnwilliams@example.org Received: (qmail 71479 invoked by uid 500); 8 Apr 2011 17:36:53 -0000 Mailing-List: contact johnwilliams@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:johnwilliams@example.org> List-Unsubscribe: <mailto:johnwilliams@example.org> List-Post: <mailto:johnwilliams@example.org> List-Id: <dev.hc.apache.org> Reply-To: "HttpComponents Project" <johnwilliams@example.org> Delivered-To: mailing list johnwilliams@example.org Received: (qmail 71470 invoked by uid 99); 8 Apr 2011 17:36:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Apr 2011 17:36:53 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 08 Apr 2011 17:36:52 +0000 Received: (qmail 82934 invoked by uid 99); 8 Apr 2011 17:36:31 -0000 Received: from localhost.apache.org (HELO mail-bw0-f51.google.com) (83.161.120.155) (smtp-auth username bdelacretaz, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Apr 2011 17:36:31 +0000 Received: by bwz10 with SMTP id 10so2772063bwz.10 for <johnwilliams@example.org>; Fri, 08 Apr 2011 10:36:29 -0700 (PDT) MIME-Version: 1.0 Received: by 83.161.120.155 with SMTP id a10mr2205138bkl.96.1302284189709; Fri, 08 Apr 2011 10:36:29 -0700 (PDT) Received: by 83.161.120.155 with HTTP; Fri, 8 Apr 2011 10:36:29 -0700 (PDT) In-Reply-To: <1302114498.21087.1.camel@ubuntu> References: <johnwilliams@example.org> <1298490537.6331.33.camel@ubuntu> <1300970649.1898.104.camel@ubuntu> <johnwilliams@example.org> <1302114498.21087.1.camel@ubuntu> Date: Fri, 8 Apr 2011 19:36:29 +0200 Message-ID: <johnwilliams@example.org> Subject: Re: Fluent interface to httpclient in Stanbol, should that move here? From: Bertrand Delacretaz <johnwilliams@example.org> To: HttpComponents Project <johnwilliams@example.org> Content-Type: text/plain; charset=UTF-8 Hi Oleg, On Wed, Apr 6, 2011 at 8:28 PM, Oleg Kalnichevski <johnwilliams@example.org> wrote: > ...Actually I just realized this might make a great Google Summer of Code > project. Probably we are already too late for this year but I'll raise a > JIRA for this idea nonetheless.... Sounds great - if that happens you can count on me for feedback and ideas where needed! -Bertrand --------------------------------------------------------------------- To unsubscribe, e-mail: johnwilliams@example.org For additional commands, e-mail: johnwilliams@example.org From johnwilliams@example.org Fri Apr 08 19:15:47 2011 Return-Path: <johnwilliams@example.org> Delivered-To: johnwilliams@example.org Received: (qmail 96111 invoked from network); 8 Apr 2011 19:15:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 8 Apr 2011 19:15:47 -0000 Received: (qmail 8381 invoked by uid 500); 8 Apr 2011 19:15:47 -0000 Delivered-To: johnwilliams@example.org Received: (qmail 8319 invoked by uid 500); 8 Apr 2011 19:15:47 -0000 Mailing-List: contact johnwilliams@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:johnwilliams@example.org> List-Unsubscribe: <mailto:johnwilliams@example.org> List-Post: <mailto:johnwilliams@example.org> List-Id: <dev.hc.apache.org> Reply-To: "HttpComponents Project" <johnwilliams@example.org> Delivered-To: mailing list johnwilliams@example.org Received: (qmail 8311 invoked by uid 99); 8 Apr 2011 19:15:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Apr 2011 19:15:47 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO hel.zones.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Apr 2011 19:15:44 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [83.161.120.155]) by hel.zones.apache.org (Postfix) with ESMTP id DE98A9805C for <johnwilliams@example.org>; Fri, 8 Apr 2011 19:15:05 +0000 (UTC) Date: Fri, 8 Apr 2011 19:15:05 +0000 (UTC) From: "Mirko Friedenhagen (JIRA)" <johnwilliams@example.org> To: johnwilliams@example.org Message-ID: <johnwilliams@example.org> In-Reply-To: <johnwilliams@example.org> Subject: [jira] [Commented] (HTTPCLIENT-1075) ContentEncodingHttpClient.execute(HttpGet, ResponseHandler<T>) throws IOException when reading chunked gzip response MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HTTPCLIENT-1075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13017607#comment-13017607 ] Mirko Friedenhagen commented on HTTPCLIENT-1075: ------------------------------------------------ Just as a comment: this is not only true for chunked responses: {code} import java.io.IOException; import org.apache.http.Header; import org.apache.http.HttpResponse; import org.apache.http.client.ClientProtocolException; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.protocol.RequestAcceptEncoding; import org.apache.http.client.protocol.ResponseContentEncoding; import org.apache.http.impl.client.BasicResponseHandler; import org.apache.http.impl.client.DefaultHttpClient; import org.junit.Test; public class BasicTest { @Test public void testIt() throws IOException { DefaultHttpClient c = new DefaultHttpClient(); c.addRequestInterceptor(new RequestAcceptEncoding()); c.addResponseInterceptor(new ResponseContentEncoding()); HttpGet get = new HttpGet("http://www.web.de/"); c.execute(get, new BasicResponseHandler() { public String handleResponse(HttpResponse response) throws ClientProtocolException, IOException { final Header[] allHeaders = response.getAllHeaders(); for (final Header header : allHeaders) { System.out.println(header); } return super.handleResponse(response); } }); } } {code} responds with: {code} johnwilliams@example.org(GZIPInputStream.java:249) at java.util.zip.GZIPInputStream.readUShort(GZIPInputStream.java:239) at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:142) at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:58) at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:67) at org.apache.http.client.entity.GzipDecompressingEntity.getContent(GzipDecompressingEntity.java:63) at org.apache.http.conn.BasicManagedEntity.getContent(BasicManagedEntity.java:88) at org.apache.http.util.EntityUtils.consume(EntityUtils.java:65) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:974) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:919) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:910) at BasicTest.testIt(BasicTest.java:24) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) {code} > ContentEncodingHttpClient.execute(HttpGet, ResponseHandler<T>) throws IOException when reading chunked gzip response > -------------------------------------------------------------------------------------------------------------------- > > Key: HTTPCLIENT-1075 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1075 > Project: HttpComponents HttpClient > Issue Type: Bug > Components: HttpClient > Affects Versions: 4.1.1 > Environment: I'm using HttpClient 4.1.1 on Mac OS X 10.6.7. > `java -version` output: > java version "1.6.0_24" > Java(TM) SE Runtime Environment (build 1.6.0_24-b07-334-10M3326) > Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02-334, mixed mode) > Reporter: Adam Hahn > Fix For: 4.1.2 > > Attachments: 0001-HTTPCLIENT-1075-ContentEncodingHttpClient-fails-when.patch > > > The following snippet: > String url = "http://yahoo.com"; > HttpClient httpClient = new ContentEncodingHttpClient(); > HttpGet get = new HttpGet(url); > String content = httpClient.execute(get, new BasicResponseHandler()); > throws: > java.io.IOException: Attempted read from closed stream. > at org.apache.http.impl.io.ChunkedInputStream.read(ChunkedInputStream.java:126) > at java.util.zip.CheckedInputStream.read(CheckedInputStream.java:42) > at java.util.zip.GZIPInputStream.readUByte(GZIPInputStream.java:205) > at java.util.zip.GZIPInputStream.readUShort(GZIPInputStream.java:197) > at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:136) > at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:58) > at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:68) > at org.apache.http.client.entity.GzipDecompressingEntity.getContent(GzipDecompressingEntity.java:63) > at org.apache.http.conn.BasicManagedEntity.getContent(BasicManagedEntity.java:88) > at org.apache.http.util.EntityUtils.consume(EntityUtils.java:65) > at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:974) > at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:919) > at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:910) > at tv.adap.service.HttpPoolTest.testChunkedGzip(HttpPoolTest.java:41) > whereas the following snippet runs fine: > String url = "http://yahoo.com"; > HttpClient httpClient = new ContentEncodingHttpClient(); > HttpGet get = new HttpGet(url); > HttpResponse response = httpClient.execute(get); > HttpEntity entity = response.getEntity(); > String content = EntityUtils.toString(entity); > These two snippets should be functionally the same (putting the entity body into content). Creating a JIRA per the recommendation of Oleg from httpclient-users. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: johnwilliams@example.org For additional commands, e-mail: johnwilliams@example.org From johnwilliams@example.org Fri Apr 08 19:19:44 2011 Return-Path: <johnwilliams@example.org> Delivered-To: johnwilliams@example.org Received: (qmail 7754 invoked from network); 8 Apr 2011 19:19:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 8 Apr 2011 19:19:44 -0000 Received: (qmail 16632 invoked by uid 500); 8 Apr 2011 19:19:44 -0000 Delivered-To: johnwilliams@example.org Received: (qmail 16593 invoked by uid 500); 8 Apr 2011 19:19:44 -0000 Mailing-List: contact johnwilliams@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:johnwilliams@example.org> List-Unsubscribe: <mailto:johnwilliams@example.org> List-Post: <mailto:johnwilliams@example.org> List-Id: <dev.hc.apache.org> Reply-To: "HttpComponents Project" <johnwilliams@example.org> Delivered-To: mailing list johnwilliams@example.org Received: (qmail 16584 invoked by uid 99); 8 Apr 2011 19:19:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Apr 2011 19:19:44 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO hel.zones.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Apr 2011 19:19:42 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [83.161.120.155]) by hel.zones.apache.org (Postfix) with ESMTP id CC1B8981E9 for <johnwilliams@example.org>; Fri, 8 Apr 2011 19:19:05 +0000 (UTC) Date: Fri, 8 Apr 2011 19:19:05 +0000 (UTC) From: "Mirko Friedenhagen (JIRA)" <johnwilliams@example.org> To: johnwilliams@example.org Message-ID: <johnwilliams@example.org> In-Reply-To: <johnwilliams@example.org> Subject: [jira] [Issue Comment Edited] (HTTPCLIENT-1075) ContentEncodingHttpClient.execute(HttpGet, ResponseHandler<T>) throws IOException when reading chunked gzip response MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HTTPCLIENT-1075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13017607#comment-13017607 ] Mirko Friedenhagen edited comment on HTTPCLIENT-1075 at 4/8/11 7:18 PM: ------------------------------------------------------------------------ Just as a comment: this applies as well for non-chunked responses: {code} import java.io.IOException; import org.apache.http.Header; import org.apache.http.HttpResponse; import org.apache.http.client.ClientProtocolException; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.protocol.RequestAcceptEncoding; import org.apache.http.client.protocol.ResponseContentEncoding; import org.apache.http.impl.client.BasicResponseHandler; import org.apache.http.impl.client.DefaultHttpClient; import org.junit.Test; public class BasicTest { @Test public void testIt() throws IOException { DefaultHttpClient c = new DefaultHttpClient(); c.addRequestInterceptor(new RequestAcceptEncoding()); c.addResponseInterceptor(new ResponseContentEncoding()); HttpGet get = new HttpGet("http://www.web.de/"); c.execute(get, new BasicResponseHandler() { public String handleResponse(HttpResponse response) throws ClientProtocolException, IOException { final Header[] allHeaders = response.getAllHeaders(); for (final Header header : allHeaders) { System.out.println(header); } return super.handleResponse(response); } }); } } {code} responds with: {code} johnwilliams@example.org(GZIPInputStream.java:249) at java.util.zip.GZIPInputStream.readUShort(GZIPInputStream.java:239) at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:142) at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:58) at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:67) at org.apache.http.client.entity.GzipDecompressingEntity.getContent(GzipDecompressingEntity.java:63) at org.apache.http.conn.BasicManagedEntity.getContent(BasicManagedEntity.java:88) at org.apache.http.util.EntityUtils.consume(EntityUtils.java:65) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:974) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:919) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:910) at BasicTest.testIt(BasicTest.java:24) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) {code} was (Author: mfriedenhagen): Just as a comment: this is not only true for chunked responses: {code} import java.io.IOException; import org.apache.http.Header; import org.apache.http.HttpResponse; import org.apache.http.client.ClientProtocolException; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.protocol.RequestAcceptEncoding; import org.apache.http.client.protocol.ResponseContentEncoding; import org.apache.http.impl.client.BasicResponseHandler; import org.apache.http.impl.client.DefaultHttpClient; import org.junit.Test; public class BasicTest { @Test public void testIt() throws IOException { DefaultHttpClient c = new DefaultHttpClient(); c.addRequestInterceptor(new RequestAcceptEncoding()); c.addResponseInterceptor(new ResponseContentEncoding()); HttpGet get = new HttpGet("http://www.web.de/"); c.execute(get, new BasicResponseHandler() { public String handleResponse(HttpResponse response) throws ClientProtocolException, IOException { final Header[] allHeaders = response.getAllHeaders(); for (final Header header : allHeaders) { System.out.println(header); } return super.handleResponse(response); } }); } } {code} responds with: {code} johnwilliams@example.org(GZIPInputStream.java:249) at java.util.zip.GZIPInputStream.readUShort(GZIPInputStream.java:239) at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:142) at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:58) at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:67) at org.apache.http.client.entity.GzipDecompressingEntity.getContent(GzipDecompressingEntity.java:63) at org.apache.http.conn.BasicManagedEntity.getContent(BasicManagedEntity.java:88) at org.apache.http.util.EntityUtils.consume(EntityUtils.java:65) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:974) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:919) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:910) at BasicTest.testIt(BasicTest.java:24) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) {code} > ContentEncodingHttpClient.execute(HttpGet, ResponseHandler<T>) throws IOException when reading chunked gzip response > -------------------------------------------------------------------------------------------------------------------- > > Key: HTTPCLIENT-1075 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1075 > Project: HttpComponents HttpClient > Issue Type: Bug > Components: HttpClient > Affects Versions: 4.1.1 > Environment: I'm using HttpClient 4.1.1 on Mac OS X 10.6.7. > `java -version` output: > java version "1.6.0_24" > Java(TM) SE Runtime Environment (build 1.6.0_24-b07-334-10M3326) > Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02-334, mixed mode) > Reporter: Adam Hahn > Fix For: 4.1.2 > > Attachments: 0001-HTTPCLIENT-1075-ContentEncodingHttpClient-fails-when.patch > > > The following snippet: > String url = "http://yahoo.com"; > HttpClient httpClient = new ContentEncodingHttpClient(); > HttpGet get = new HttpGet(url); > String content = httpClient.execute(get, new BasicResponseHandler()); > throws: > java.io.IOException: Attempted read from closed stream. > at org.apache.http.impl.io.ChunkedInputStream.read(ChunkedInputStream.java:126) > at java.util.zip.CheckedInputStream.read(CheckedInputStream.java:42) > at java.util.zip.GZIPInputStream.readUByte(GZIPInputStream.java:205) > at java.util.zip.GZIPInputStream.readUShort(GZIPInputStream.java:197) > at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:136) > at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:58) > at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:68) > at org.apache.http.client.entity.GzipDecompressingEntity.getContent(GzipDecompressingEntity.java:63) > at org.apache.http.conn.BasicManagedEntity.getContent(BasicManagedEntity.java:88) > at org.apache.http.util.EntityUtils.consume(EntityUtils.java:65) > at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:974) > at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:919) > at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:910) > at tv.adap.service.HttpPoolTest.testChunkedGzip(HttpPoolTest.java:41) > whereas the following snippet runs fine: > String url = "http://yahoo.com"; > HttpClient httpClient = new ContentEncodingHttpClient(); > HttpGet get = new HttpGet(url); > HttpResponse response = httpClient.execute(get); > HttpEntity entity = response.getEntity(); > String content = EntityUtils.toString(entity); > These two snippets should be functionally the same (putting the entity body into content). Creating a JIRA per the recommendation of Oleg from httpclient-users. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: johnwilliams@example.org For additional commands, e-mail: johnwilliams@example.org From johnwilliams@example.org Fri Apr 08 19:42:44 2011 Return-Path: <johnwilliams@example.org> Delivered-To: johnwilliams@example.org Received: (qmail 88698 invoked from network); 8 Apr 2011 19:42:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 8 Apr 2011 19:42:44 -0000 Received: (qmail 66206 invoked by uid 500); 8 Apr 2011 19:42:43 -0000 Delivered-To: johnwilliams@example.org Received: (qmail 66082 invoked by uid 500); 8 Apr 2011 19:42:43 -0000 Mailing-List: contact johnwilliams@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:johnwilliams@example.org> List-Unsubscribe: <mailto:johnwilliams@example.org> List-Post: <mailto:johnwilliams@example.org> List-Id: <dev.hc.apache.org> Reply-To: "HttpComponents Project" <johnwilliams@example.org> Delivered-To: mailing list johnwilliams@example.org Received: (qmail 66074 invoked by uid 99); 8 Apr 2011 19:42:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Apr 2011 19:42:43 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO hel.zones.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Apr 2011 19:42:42 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [83.161.120.155]) by hel.zones.apache.org (Postfix) with ESMTP id D5C0D98945 for <johnwilliams@example.org>; Fri, 8 Apr 2011 19:42:05 +0000 (UTC) Date: Fri, 8 Apr 2011 19:42:05 +0000 (UTC) From: "Mirko Friedenhagen (JIRA)" <johnwilliams@example.org> To: johnwilliams@example.org Message-ID: <johnwilliams@example.org> In-Reply-To: <johnwilliams@example.org> Subject: [jira] [Commented] (HTTPCLIENT-1075) ContentEncodingHttpClient.execute(HttpGet, ResponseHandler<T>) throws IOException when reading chunked gzip response MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HTTPCLIENT-1075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13017619#comment-13017619 ] Mirko Friedenhagen commented on HTTPCLIENT-1075: ------------------------------------------------ I retried my tests with the version from: [mirko@borg 4.1.x]$ svn info Path: . URL: https://svn.apache.org/repos/asf/httpcomponents/httpclient/branches/4.1.x Repository Root: https://svn.apache.org/repos/asf Repository UUID: 13f79535-47bb-0310-9956-ffa450edef68 Revision: 1090406 Node Kind: directory Schedule: normal Last Changed Author: olegk Last Changed Rev: 1088006 Last Changed Date: 2011-04-02 13:47:25 +0200 (Sat, 02 Apr 2011) Works flawlessly. Any hints, when 4.1.2 will be released? > ContentEncodingHttpClient.execute(HttpGet, ResponseHandler<T>) throws IOException when reading chunked gzip response > -------------------------------------------------------------------------------------------------------------------- > > Key: HTTPCLIENT-1075 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1075 > Project: HttpComponents HttpClient > Issue Type: Bug > Components: HttpClient > Affects Versions: 4.1.1 > Environment: I'm using HttpClient 4.1.1 on Mac OS X 10.6.7. > `java -version` output: > java version "1.6.0_24" > Java(TM) SE Runtime Environment (build 1.6.0_24-b07-334-10M3326) > Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02-334, mixed mode) > Reporter: Adam Hahn > Fix For: 4.1.2 > > Attachments: 0001-HTTPCLIENT-1075-ContentEncodingHttpClient-fails-when.patch > > > The following snippet: > String url = "http://yahoo.com"; > HttpClient httpClient = new ContentEncodingHttpClient(); > HttpGet get = new HttpGet(url); > String content = httpClient.execute(get, new BasicResponseHandler()); > throws: > java.io.IOException: Attempted read from closed stream. > at org.apache.http.impl.io.ChunkedInputStream.read(ChunkedInputStream.java:126) > at java.util.zip.CheckedInputStream.read(CheckedInputStream.java:42) > at java.util.zip.GZIPInputStream.readUByte(GZIPInputStream.java:205) > at java.util.zip.GZIPInputStream.readUShort(GZIPInputStream.java:197) > at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:136) > at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:58) > at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:68) > at org.apache.http.client.entity.GzipDecompressingEntity.getContent(GzipDecompressingEntity.java:63) > at org.apache.http.conn.BasicManagedEntity.getContent(BasicManagedEntity.java:88) > at org.apache.http.util.EntityUtils.consume(EntityUtils.java:65) > at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:974) > at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:919) > at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:910) > at tv.adap.service.HttpPoolTest.testChunkedGzip(HttpPoolTest.java:41) > whereas the following snippet runs fine: > String url = "http://yahoo.com"; > HttpClient httpClient = new ContentEncodingHttpClient(); > HttpGet get = new HttpGet(url); > HttpResponse response = httpClient.execute(get); > HttpEntity entity = response.getEntity(); > String content = EntityUtils.toString(entity); > These two snippets should be functionally the same (putting the entity body into content). Creating a JIRA per the recommendation of Oleg from httpclient-users. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: johnwilliams@example.org For additional commands, e-mail: johnwilliams@example.org From johnwilliams@example.org Fri Apr 08 19:47:46 2011 Return-Path: <johnwilliams@example.org> Delivered-To: johnwilliams@example.org Received: (qmail 13708 invoked from network); 8 Apr 2011 19:47:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 8 Apr 2011 19:47:46 -0000 Received: (qmail 74347 invoked by uid 500); 8 Apr 2011 19:47:46 -0000 Delivered-To: johnwilliams@example.org Received: (qmail 74309 invoked by uid 500); 8 Apr 2011 19:47:46 -0000 Mailing-List: contact johnwilliams@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:johnwilliams@example.org> List-Unsubscribe: <mailto:johnwilliams@example.org> List-Post: <mailto:johnwilliams@example.org> List-Id: <dev.hc.apache.org> Reply-To: "HttpComponents Project" <johnwilliams@example.org> Delivered-To: mailing list johnwilliams@example.org Received: (qmail 74301 invoked by uid 99); 8 Apr 2011 19:47:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Apr 2011 19:47:46 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO hel.zones.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Apr 2011 19:47:43 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [83.161.120.155]) by hel.zones.apache.org (Postfix) with ESMTP id C6BFF98A9D for <johnwilliams@example.org>; Fri, 8 Apr 2011 19:47:05 +0000 (UTC) Date: Fri, 8 Apr 2011 19:47:05 +0000 (UTC) From: "James Abley (JIRA)" <johnwilliams@example.org> To: johnwilliams@example.org Message-ID: <johnwilliams@example.org> In-Reply-To: <johnwilliams@example.org> Subject: [jira] [Commented] (HTTPCLIENT-1075) ContentEncodingHttpClient.execute(HttpGet, ResponseHandler<T>) throws IOException when reading chunked gzip response MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HTTPCLIENT-1075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13017620#comment-13017620 ] James Abley commented on HTTPCLIENT-1075: ----------------------------------------- MIrko, Sorry, I should have made my comments clearer. I picked up that the problem was with the interaction between BasicResponseHandler and the ResponseContentEncoding class. Your test in the previous comment runs without problems against current trunk code and the branch 4.1.x. Thanks for the clarification. > ContentEncodingHttpClient.execute(HttpGet, ResponseHandler<T>) throws IOException when reading chunked gzip response > -------------------------------------------------------------------------------------------------------------------- > > Key: HTTPCLIENT-1075 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1075 > Project: HttpComponents HttpClient > Issue Type: Bug > Components: HttpClient > Affects Versions: 4.1.1 > Environment: I'm using HttpClient 4.1.1 on Mac OS X 10.6.7. > `java -version` output: > java version "1.6.0_24" > Java(TM) SE Runtime Environment (build 1.6.0_24-b07-334-10M3326) >
{'source': 'Apache Software Foundation Public Mail Archives'}