Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-2322

Interceptors cannot make a copy of the returned input stream in JaxRS clients

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.2
    • 2.2.3, 2.3
    • JAX-RS
    • None

    Description

      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

      Attachments

        1. CXF-2322.patch
          8 kB
          Eamonn Dwyer

        Activity

          People

            sergey_beryozkin Sergey Beryozkin
            eamonndwyer Eamonn Dwyer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: