cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CXF-2322) Interceptors cannot make a copy of the returned input stream in JaxRS clients
Date Fri, 26 Jun 2009 19:33:47 GMT

    [ https://issues.apache.org/jira/browse/CXF-2322?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12724669#action_12724669
] 

Daniel Kulp commented on CXF-2322:
----------------------------------


Well, we already have an InterceptorProvider interface for the interceptors.   :-)

> 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.


Mime
View raw message