Return-Path: Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: (qmail 63158 invoked from network); 26 Jun 2009 14:01:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Jun 2009 14:01:18 -0000 Received: (qmail 19290 invoked by uid 500); 26 Jun 2009 14:01:29 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 19275 invoked by uid 500); 26 Jun 2009 14:01:29 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 19265 invoked by uid 99); 26 Jun 2009 14:01:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Jun 2009 14:01:29 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Jun 2009 14:01:27 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 586EC234C004 for ; Fri, 26 Jun 2009 07:01:07 -0700 (PDT) Message-ID: <257275329.1246024867350.JavaMail.jira@brutus> Date: Fri, 26 Jun 2009 07:01:07 -0700 (PDT) From: "Eamonn Dwyer (JIRA)" To: issues@cxf.apache.org Subject: [jira] Updated: (CXF-2322) Interceptors cannot make a copy of the returned input stream in JaxRS clients In-Reply-To: <694536134.1246024627439.JavaMail.jira@brutus> 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/CXF-2322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Eamonn Dwyer updated CXF-2322: ------------------------------ Attachment: CXF-2322.patch I also made the getter and setter methods for the InInterceptors and OutInterceptors on the AbstractClient class public so that a client can add interceptors to the list. > Interceptors cannot make a copy of the returned input stream in JaxRS clients > ----------------------------------------------------------------------------- > > Key: CXF-2322 > URL: https://issues.apache.org/jira/browse/CXF-2322 > Project: CXF > Issue Type: Bug > Components: REST > Affects Versions: 2.2.2 > Reporter: Eamonn Dwyer > Fix For: 2.2.3 > > Attachments: CXF-2322.patch > > > The JaxWS clients use the stream object stored as inMessage.setContent(InputStream.class, is) which allows other interceptors to make copies of the returned stream. The JaxRS client however always goes back to the HttpInputStream stored in the HTTPURLConnection object. If you try to make a copy of the stream data you drain the HttpInputStream data and eventually the respose call will fail because the HttpInputStream is empty. > I'ld like to propose a change to get the JaxRS client to always first check to see if a call to inMessage.getContent(InputStream) returns a stream and if not then default back to the HttpURLConnection's HttpInputStream. This will allow other intercpetors to make copies of the stream data. > Patch to follow very soon -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.