-
Bug
-
Resolution: Done
-
Critical
-
3.6.2.Final, 4.0.0.Beta6
ClientReponse.getEntity():
According to the Response.getEntity() javadoc this method MUST : "throw an IllegalStateException if the entity was previously fully consumed as an InputStream input stream". That what we started to achieve with asoldano in jira https://issues.jboss.org/browse/RESTEASY-1700, but i figured out that we forgot one case.
Following case will fail for example:
InputStream inputStream=response.readEntity(InputStream.class); //Fully consumed the original response stream while (inputStream.read() != -1) { } //Following line Must throw an IllegalStateException but it will not response.getEntity();
ClientReponse.bufferEntity():
According to the Response.bufferEntity() javadoc this method MUST : "return false in case the response entity instance is not backed by an unconsumed input stream" since it will prevent reading all the bytes of the original entity input stream given that the stream is already fully or partially consumed.
Current implementation of ClientResponse does not follow those lines and following case fail for example:
InputStream inputStream=(InputStream) response.getEntity(); while (inputStream.read() != -1) { } //Following line Must return false but it will not response.bufferEntity()
- is incorporated by
-
WFLY-11648 Upgrade to RESTEasy 3.6.3.Final
- Closed
- relates to
-
RESTEASY-1700 ClientResponse does not return the message entity
- Closed