Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-2602

Response closes after closing replaced entity stream in ClientResponseContext

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • None
    • 4.4.2.Final, 3.11.0.Final
    • jaxrs
    • None

      When you get entity stream in ClientResponseContext, read it and then want to replace it again (for other filters or just response reader), normally you would close old stream.

      Stream from ClientResponse uses InputStreamWrapper from AbstractBuiltResponse, which closes response when close'ing stream. This automatically blocks closing stream provided in ClientResponseContext. This problem breaks completely usage of entity in filters, either because of closing response (if you close stream, which is normal thing you do), or because of not closed streams

            weli@redhat.com Weinan Li
            oszust002 Kamil Osuch (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: