Return-Path: X-Original-To: apmail-hc-dev-archive@www.apache.org Delivered-To: apmail-hc-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B7EAACDAB for ; Sun, 3 Jun 2012 11:37:29 +0000 (UTC) Received: (qmail 99270 invoked by uid 500); 3 Jun 2012 11:37:29 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 98981 invoked by uid 500); 3 Jun 2012 11:37:24 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 98931 invoked by uid 99); 3 Jun 2012 11:37:23 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Jun 2012 11:37:23 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 248891402B8 for ; Sun, 3 Jun 2012 11:37:23 +0000 (UTC) Date: Sun, 3 Jun 2012 11:37:23 +0000 (UTC) From: "Oleg Kalnichevski (JIRA)" To: dev@hc.apache.org Message-ID: <1463865101.31619.1338723443153.JavaMail.jiratomcat@issues-vm> In-Reply-To: <468646621.20824.1338451583218.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Resolved] (HTTPCLIENT-1199) DecompressingHttpClient strips POST content from request 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-1199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Oleg Kalnichevski resolved HTTPCLIENT-1199. ------------------------------------------- Resolution: Fixed Fix Version/s: 4.2.1 The problem with handling of entity enclosing requests has been fixed. The redirect problem is a massively more complex one and its fix will require a significant refactoring. For the time being one can avoid problems with redirects by adding protocol interceptors directly to the protocol processing chain of the DefaultHttpClient instead of using DecompressingHttpClient decorator. --- DefaultHttpClient httpClient = new DefaultHttpClient(); httpClient.addRequestInterceptor(new RequestAcceptEncoding()); httpClient.addResponseInterceptor(new ResponseContentEncoding()); --- Oleg > DecompressingHttpClient strips POST content from request > -------------------------------------------------------- > > Key: HTTPCLIENT-1199 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1199 > Project: HttpComponents HttpClient > Issue Type: Bug > Components: HttpClient > Affects Versions: 4.2 Final > Environment: Ubuntu / openjdk-7 > Reporter: Guillaume Castagnino > Fix For: 4.2.1 > > Attachments: fix-wrapper.patch > > > When upgrading from HttpClient 4.1 to HttpClient 4.2, I have to migrate my ContentEncodingHttpClient to a decorated DecompressingHttpClient. > But there is a problem with HttpPost requests : the POST content is missing. > Looking at the DecompressingHttpClient code : http://hc.apache.org/httpcomponents-client-ga/httpclient/clover/org/apache/http/impl/client/DecompressingHttpClient.html, the issue seems to be that DecompressingHttpClient use a HttpRequest wrapped by a RequestWrapper at line 130 to execute. But this wrapper only clone headers and params, disregarding the request type, so the entity is not cloned. > When feeding the DecompressingHttpClient with a HttpPost request, this leads to partial request with no entity : over the network, I get POST requests with no content ! > Solution should be to stop using a wrapped request ? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org